Package com.sun.grid.security.login
Class TestLoginModule
java.lang.Object
com.sun.grid.security.login.TestLoginModule
- All Implemented Interfaces:
LoginModule
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanabort()Abort the login.booleancommit()Commit the login (adds the principals to the subject)voidinitialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) Initialize theTestLoginModulebooleanlogin()Perform the login.booleanlogout()Removes all previously added prinicipals from the subject.
-
Constructor Details
-
TestLoginModule
public TestLoginModule()
-
-
Method Details
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) Initialize theTestLoginModule- Specified by:
initializein interfaceLoginModule- Parameters:
subject- the current subjectcallbackHandler- the callbackhandler (must at least handle aNameCallbackand a PasswordCallback).sharedState- not usedoptions- contains the options for theTestLoginModule.
-
login
Perform the login.- Specified by:
loginin interfaceLoginModule- Returns:
trueon successfull authentication.falseif username of password is invalid.- Throws:
LoginException-- if the callbackhandler reports an error
- if some options are missing (please check the jass.config file)
- if the underlying authentication system report an error
-
commit
public boolean commit()Commit the login (adds the principals to the subject)- Specified by:
commitin interfaceLoginModule- Returns:
trueof the principals has been added to the subject.
-
abort
public boolean abort()Abort the login.- Specified by:
abortin interfaceLoginModule- Returns:
- Always
true
-
logout
public boolean logout()Removes all previously added prinicipals from the subject.- Specified by:
logoutin interfaceLoginModule- Returns:
- Always
true
-