com.sun.grid.security.login
public class TestLoginModule extends java.lang.Object implements javax.security.auth.spi.LoginModule
Constructor and Description |
---|
TestLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Abort the login.
|
boolean |
commit()
Commit the login (adds the principals to the subject)
|
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
Initialize the
TestLoginModule |
boolean |
login()
Perform the login.
|
boolean |
logout()
Removes all previously added prinicipals from the subject.
|
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
TestLoginModule
initialize
in interface javax.security.auth.spi.LoginModule
subject
- the current subjectcallbackHandler
- the callbackhandler (must at least handle a
NameCallback
and a
PasswordCallback).sharedState
- not usedoptions
- contains the options for the TestLoginModule
.public boolean login() throws javax.security.auth.login.LoginException
login
in interface javax.security.auth.spi.LoginModule
true
on successfull authentication. false
if username of password is invalid.javax.security.auth.login.LoginException
- public boolean commit()
commit
in interface javax.security.auth.spi.LoginModule
true
of the principals has been added to the subject.public boolean abort()
abort
in interface javax.security.auth.spi.LoginModule
true
public boolean logout()
logout
in interface javax.security.auth.spi.LoginModule
true