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 TypeMethodDescriptionboolean
abort()
Abort the login.boolean
commit()
Commit the login (adds the principals to the subject)void
initialize
(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) Initialize theTestLoginModule
boolean
login()
Perform the login.boolean
logout()
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:
initialize
in interfaceLoginModule
- Parameters:
subject
- the current subjectcallbackHandler
- the callbackhandler (must at least handle aNameCallback
and a PasswordCallback).sharedState
- not usedoptions
- contains the options for theTestLoginModule
.
-
login
Perform the login.- Specified by:
login
in interfaceLoginModule
- Returns:
true
on successfull authentication.false
if 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:
commit
in interfaceLoginModule
- Returns:
true
of the principals has been added to the subject.
-
abort
public boolean abort()Abort the login.- Specified by:
abort
in interfaceLoginModule
- Returns:
- Always
true
-
logout
public boolean logout()Removes all previously added prinicipals from the subject.- Specified by:
logout
in interfaceLoginModule
- Returns:
- Always
true
-