|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
jrun.security.XMLLoginModule
JAAS Login Module for default user authentication. Uses the default JRunUserManager service as the data source for user security information Based on the "mode" parameter from the config file login module entry, the login method authenticates the user and password or validates that the user is in the specified roles collection Never use JNDI inside JRun LoginModules. Could lead to infinite loops
| Field Summary | |
protected javax.security.auth.callback.CallbackHandler |
cbHandler
|
protected java.lang.String |
loginMode
|
protected java.util.Map |
options
|
protected java.util.Map |
sharedState
|
protected javax.security.auth.Subject |
subject
|
| Constructor Summary | |
XMLLoginModule()
|
|
| Method Summary | |
boolean |
abort()
This method is called if the LoginContext's overall authentication failed. |
boolean |
commit()
This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded). |
void |
initialize(javax.security.auth.Subject subj,
javax.security.auth.callback.CallbackHandler cbh,
java.util.Map sharedState,
java.util.Map options)
Initialize method for the Login Module options param provides the XML filename to read see JAAS javadoc for detailed explanation |
boolean |
login()
Login method called by the LoginContext. |
protected boolean |
loginUser()
|
boolean |
logout()
Logout the user. |
protected boolean |
validateRole()
|
| Field Detail |
protected javax.security.auth.Subject subject
protected javax.security.auth.callback.CallbackHandler cbHandler
protected java.util.Map sharedState
protected java.util.Map options
protected java.lang.String loginMode
| Constructor Detail |
public XMLLoginModule()
| Method Detail |
public void initialize(javax.security.auth.Subject subj,
javax.security.auth.callback.CallbackHandler cbh,
java.util.Map sharedState,
java.util.Map options)
public boolean login()
throws javax.security.auth.login.LoginException
protected boolean loginUser()
throws javax.security.auth.login.LoginException
protected boolean validateRole()
throws javax.security.auth.login.LoginException
public boolean commit()
throws javax.security.auth.login.LoginException
This method is called if the LoginContext's overall authentication succeeded (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules succeeded).
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login method), then this method associates a
SimplePrincipal
with the Subject located in the
LoginModule. If this LoginModule's own
authentication attempted failed, then this method removes
any state that was originally saved.
LoginException - if the commit fails.
public boolean abort()
throws javax.security.auth.login.LoginException
This method is called if the LoginContext's overall authentication failed. (the relevant REQUIRED, REQUISITE, SUFFICIENT and OPTIONAL LoginModules did not succeed).
If this LoginModule's own authentication attempt
succeeded (checked by retrieving the private state saved by the
login and commit methods),
then this method cleans up any state that was originally saved.
LoginException - if the abort fails.
public boolean logout()
throws javax.security.auth.login.LoginException
This method removes the SamplePrincipal
that was added by the commit method.
LoginModule
should not be ignored.LoginException - if the logout fails.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||