|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.kernel.security.PasswordLoginModule
Superclass of LoginModules that authenticate users using a username and password. Fetches the username/password from shared data if possible, otherwise queries the user directly using callbacks. Saves the username/password in shared data for use by other LoginModules.
Field Summary | |
static String |
NAME_KEY
Key for username in shared data map. |
static String |
PASSWORD_KEY
Key for password in shared data map. |
static String |
versionId
|
Constructor Summary | |
PasswordLoginModule()
|
Method Summary | |
abstract boolean |
abort()
|
protected abstract void |
checkPassword(String username,
char[] password)
Checks whether the given username/password combination is valid. |
abstract boolean |
commit()
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
Map shared,
Map options)
|
boolean |
login()
Retreives the username and password and calls the checkPassword method. |
abstract boolean |
logout()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
public static final String NAME_KEY
public static final String PASSWORD_KEY
Constructor Detail |
public PasswordLoginModule()
Method Detail |
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
initialize
in interface javax.security.auth.spi.LoginModule
public boolean login() throws javax.security.auth.login.LoginException
checkPassword
method.
login
in interface javax.security.auth.spi.LoginModule
true
.
javax.security.auth.login.LoginException
- if an error occurs. Propagates exceptions
thrown by the checkPassword
method.checkPassword(String, char[])
protected abstract void checkPassword(String username, char[] password) throws javax.security.auth.login.LoginException
username
- the username to checkpassword
- the password to check
AccountNotFoundException
- if the account does not exist.
AccountExpiredException
- if the account has expired.
AccountLockedException
- if the account is locked.
FailedLoginException
- if the password is invalid.
javax.security.auth.login.LoginException
- if an error occurs.public abstract boolean commit() throws javax.security.auth.login.LoginException
commit
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public abstract boolean abort() throws javax.security.auth.login.LoginException
abort
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public abstract boolean logout() throws javax.security.auth.login.LoginException
logout
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |