public class ClientLoginModule extends Object implements LoginModule
Constructor and Description |
---|
ClientLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort()
Aborts the authentication process (phase 2).
|
boolean |
commit()
Commits the authentication process (phase 2).
|
Principal |
createPrincipal(String name) |
static LoginStack.Entry |
getCurrentLogin() |
static LoginStack |
getThreadLocalLogin() |
void |
initialize(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options)
Initialize this LoginModule.
|
boolean |
login()
Authenticates a Subject (phase 1).
|
boolean |
logout() |
public static LoginStack getThreadLocalLogin()
public static LoginStack.Entry getCurrentLogin()
public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options)
initialize
in interface LoginModule
public boolean login() throws LoginException
login
in interface LoginModule
LoginException
public boolean commit() throws LoginException
This is where the SecurityAssociation information is set. The principal is obtained from: The shared state javax.security.auth.login.name property when useFirstPass is true. If the value is a Principal it is used as is, else a SimplePrincipal using the value.toString() as its name is used. If useFirstPass the username obtained from the callback handler is used to build the SimplePrincipal. Both may be overridden if the resulting authenticated Subject principals set it not empty.
commit
in interface LoginModule
LoginException
public boolean abort() throws LoginException
abort
in interface LoginModule
LoginException
public boolean logout() throws LoginException
logout
in interface LoginModule
LoginException
public Principal createPrincipal(String name) throws LoginException
LoginException
Copyright © 2011 Nuxeo SA. All Rights Reserved.