java.lang.Object
com.obinary.cms.admin.Authenticator
- public class Authenticator
- extends java.lang.Object
User: sameercharles
Date: May 6, 2003
Time: 10:35:12 AM
- Version:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
userId
private java.lang.String userId
pswd
private java.lang.String pswd
authString
private java.lang.String authString
Authenticator
public Authenticator()
authenticate
public static boolean authenticate(javax.servlet.http.HttpServletRequest req)
throws java.io.IOException,
RepositoryException
Authenticate authorization request with the usersRepository
isValidUser
private static boolean isValidUser(javax.servlet.http.HttpServletRequest request)
throws RepositoryException
checks is the credentials exist in the repository
Ver : 1
Ver : 2
: FIXME needs to check user rights
getDecodedCredentials
private static java.lang.String getDecodedCredentials(java.lang.String credentials)
throws java.io.IOException
uses sun.misc.BASE64Decoder
setUserId
private static void setUserId(java.lang.String decodedCredentials,
javax.servlet.http.HttpServletRequest request)
setPassword
private static void setPassword(java.lang.String decodedCredentials,
javax.servlet.http.HttpServletRequest request)
getUserId
public static java.lang.String getUserId(javax.servlet.http.HttpServletRequest request)
getPassword
public static char[] getPassword(javax.servlet.http.HttpServletRequest request)
getPasswordAsString
private static java.lang.String getPasswordAsString(javax.servlet.http.HttpServletRequest request)
getCredentials
public static java.lang.String getCredentials(javax.servlet.http.HttpServletRequest request)
isAuthenticated
public static boolean isAuthenticated(javax.servlet.http.HttpServletRequest request)