public final class AppLoginModule extends Object implements LoginModule
| Constructor and Description |
|---|
AppLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Aborts the authentication (second phase).
|
boolean |
commit()
Commits the authentication (second phase).
|
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map<String,?> sharedState,
Map<String,?> options) |
boolean |
login()
Retrieves the user name by querying the property of Constants.SECURITY_LOGIN_USERNAME.
|
boolean |
logout()
Logs out the user
|
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
initialize in interface LoginModulepublic boolean login()
throws LoginException
login in interface LoginModuleLoginExceptionpublic boolean abort()
throws LoginException
This method is called if the LoginContext's overall authentication failed. (login failed) It cleans up any state that was changed in the login and commit methods.
abort in interface LoginModuleLoginExceptionpublic boolean commit()
throws LoginException
This method is called if the LoginContext's overall authentication succeeded. The implementation first checks if there is already Tachyon user in the subject. If not, it adds the previously logged in Tachyon user into the subject.
commit in interface LoginModuleLoginException - not Tachyon user is found or createdpublic boolean logout()
throws LoginException
The implementation removes the User associated with the Subject.
logout in interface LoginModuleLoginException - if logout failsCopyright © 2015. All Rights Reserved.