com.ibm.wsspi.wssecurity.auth.module
Class UsernameLoginModule
- java.lang.Object
com.ibm.wsspi.wssecurity.auth.module.UsernameLoginModule
All implemented interfaces:
javax.security.auth.spi.LoginModule
- 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
.
See Also:
WSSecurityMappingModule
,
LoginModule
Constructor Summary
Constructor and Description |
---|
UsernameLoginModule()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
abort()
Aborts the login process by removing the username and password from the Subect.
|
|
commit()
Commits the login process by adding the username and password to the Subject.
|
|
initialize(javax.security.auth.Subject subject,javax.security.auth.callback.CallbackHandler handler,java.util.Map sharedState,java.util.Map options)
Intializes this LoginModule.
|
|
login()
Validates the username and password.
|
|
logout()
Logs out the login process.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
UsernameLoginModule
- public UsernameLoginModule()
Method Detail
initialize
- public void initialize(javax.security.auth.Subject subject,
- javax.security.auth.callback.CallbackHandler handler,
- java.util.Map sharedState,
- java.util.Map options)
Intializes this LoginModule.
Specified by:
initialize
in interface javax.security.auth.spi.LoginModule
Parameters:
subject
- 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. See Also:
LoginModule.initialize(javax.security.auth.Subject,
javax.security.auth.callback.CallbackHandler, java.util.Map, java.util.Map)
login
- public boolean login()
- throws javax.security.auth.login.LoginException
Validates the username and password.
Specified by:
login
in interface javax.security.auth.spi.LoginModule
Returns:
true if the login is successful, false otherwise
Throws:
javax.security.auth.login.LoginException
- if the login fails See Also:
LoginModule.login()
commit
- public boolean commit()
- throws javax.security.auth.login.LoginException
Commits the login process by adding the username and password to the Subject.
Specified by:
commit
in interface javax.security.auth.spi.LoginModule
Returns:
true if the commit is successful, false otherwise
Throws:
javax.security.auth.login.LoginException
- if the commit fails See Also:
LoginModule.commit()
abort
- public boolean abort()
- throws javax.security.auth.login.LoginException
Aborts the login process by removing the username and password from the Subect.
Specified by:
abort
in interface javax.security.auth.spi.LoginModule
Returns:
true if the abort was successful, false otherwise
Throws:
javax.security.auth.login.LoginException
- if the abort fails See Also:
LoginModule.abort()
logout
- public boolean logout()
- throws javax.security.auth.login.LoginException
Logs out the login process.
Specified by:
logout
in interface javax.security.auth.spi.LoginModule
Returns:
true if the logout is successful, false otherwise
Throws:
javax.security.auth.login.LoginException
- if the abort fails See Also:
LoginModule.logout()