Package com.sun.grid.security.login
Class TestLoginModule
- java.lang.Object
-
- com.sun.grid.security.login.TestLoginModule
-
- All Implemented Interfaces:
javax.security.auth.spi.LoginModule
public class TestLoginModule extends java.lang.Object implements javax.security.auth.spi.LoginModule
-
-
Constructor Summary
Constructors Constructor Description TestLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort()Abort the login.booleancommit()Commit the login (adds the principals to the subject)voidinitialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)Initialize theTestLoginModulebooleanlogin()Perform the login.booleanlogout()Removes all previously added prinicipals from the subject.
-
-
-
Method Detail
-
initialize
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)Initialize theTestLoginModule- Specified by:
initializein interfacejavax.security.auth.spi.LoginModule- Parameters:
subject- the current subjectcallbackHandler- the callbackhandler (must at least handle aNameCallbackand a PasswordCallback).sharedState- not usedoptions- contains the options for theTestLoginModule.
-
login
public boolean login() throws javax.security.auth.login.LoginExceptionPerform the login.- Specified by:
loginin interfacejavax.security.auth.spi.LoginModule- Returns:
trueon successfull authentication.falseif username of password is invalid.- Throws:
javax.security.auth.login.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 interfacejavax.security.auth.spi.LoginModule- Returns:
trueof the principals has been added to the subject.
-
abort
public boolean abort()
Abort the login.- Specified by:
abortin interfacejavax.security.auth.spi.LoginModule- Returns:
- Always
true
-
logout
public boolean logout()
Removes all previously added prinicipals from the subject.- Specified by:
logoutin interfacejavax.security.auth.spi.LoginModule- Returns:
- Always
true
-
-