net.sf.jguard.authentication.loginmodules
Class XmlLoginModule
java.lang.Object
net.sf.jguard.authentication.loginmodules.UserLoginModule
net.sf.jguard.authentication.loginmodules.XmlLoginModule
- All Implemented Interfaces:
- javax.security.auth.spi.LoginModule
public class XmlLoginModule
- extends UserLoginModule
- implements javax.security.auth.spi.LoginModule
LoginModule configured by the jGuardUsersPrincipals XML file.
- Author:
- Charles Gay
|
Method Summary |
boolean |
commit()
add Principals and Public/Private credentials to Subject. |
void |
initialize(javax.security.auth.Subject subj,
javax.security.auth.callback.CallbackHandler cbkHandler,
java.util.Map sState,
java.util.Map opts)
initialize the loginModule. |
boolean |
login()
Authenticate the user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.security.auth.spi.LoginModule |
abort, logout |
XmlLoginModule
public XmlLoginModule()
initialize
public void initialize(javax.security.auth.Subject subj,
javax.security.auth.callback.CallbackHandler cbkHandler,
java.util.Map sState,
java.util.Map opts)
- initialize the loginModule.
- Specified by:
initialize in interface javax.security.auth.spi.LoginModule- Overrides:
initialize in class UserLoginModule
- Parameters:
subject - callbackHandler - sharedState - options -
login
public boolean login()
throws javax.security.auth.login.LoginException
- Authenticate the user.
- Specified by:
login in interface javax.security.auth.spi.LoginModule
- Returns:
- true if the user is authenticated, false otherwise.
- Throws:
javax.security.auth.login.FailedLoginException - authentication fails
javax.security.auth.login.LoginException - if this LoginModule is unable to perform the authentication.
commit
public boolean commit()
throws javax.security.auth.login.LoginException
- add Principals and Public/Private credentials to Subject.
- Specified by:
commit in interface javax.security.auth.spi.LoginModule
- Throws:
javax.security.auth.login.LoginException- See Also:
LoginModule.commit()