public class UsernameLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule
LoginModule that validates a username/password pair and adds them to the Subject.WSSecurityMappingModule,
LoginModule| Constructor and Description |
|---|
UsernameLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Aborts the login process by removing the username and password from the Subect.
|
boolean |
commit()
Commits the login process by adding the username and password to the Subject.
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
java.util.Map sharedState,
java.util.Map options)
Intializes this LoginModule.
|
boolean |
login()
Validates the username and password.
|
boolean |
logout()
Logs out the login process.
|
public void initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
java.util.Map sharedState,
java.util.Map options)
initialize in interface javax.security.auth.spi.LoginModulesubject - The Subject to be authenticated.handler - The CallbackHandler used to gather login data from the user.sharedState - State data shared between login modules.options - A Map of key-value pairs specifying configuration options for this login module.LoginModule.initialize(javax.security.auth.Subject,
javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)public boolean login()
throws javax.security.auth.login.LoginException
login in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the login failsLoginModule.login()public boolean commit()
throws javax.security.auth.login.LoginException
commit in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the commit failsLoginModule.commit()public boolean abort()
throws javax.security.auth.login.LoginException
abort in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the abort failsLoginModule.abort()public boolean logout()
throws javax.security.auth.login.LoginException
logout in interface javax.security.auth.spi.LoginModulejavax.security.auth.login.LoginException - if the abort failsLoginModule.logout()