public interface LoginModule
This interface is used by service providers that implement login
services, and is used internally by the JAAS system. It is not useful
to application programmers, who should use the LoginContext
instead.
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Abort the current login attempt.
|
boolean |
commit()
Commit the current login attempt.
|
void |
initialize(Subject subject,
CallbackHandler handler,
Map<String,?> sharedState,
Map<String,?> options)
Initializes this login module.
|
boolean |
login()
Authenticates a subject to the system.
|
boolean |
logout()
Logs a subject out.
|
boolean abort() throws LoginException
login()
if the overall login attempt fails (that is, if one of the other login
modules that is REQUIRED or REQUISITE fails). This method should clean
up this module's saved state, if any.LoginException
- If the abort fails.boolean commit() throws LoginException
login()
if the overall login attempt succeeds (that is, all
methods have satisfied all REQUIRED, REQUISITE, SUFFICIENT and
OPTIONAL module requirements).LoginException
- If the commit fails.void initialize(Subject subject, CallbackHandler handler, Map<String,?> sharedState, Map<String,?> options)
subject
- The subject being authenticated.handler
- The callback handler for user input.sharedState
- A mapping that is shared between all login
modules.options
- A mapping of options given to this module.boolean login() throws LoginException
LoginException
- If this method fails.boolean logout() throws LoginException
LoginException
- If this method fails.