|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.jaas.sp.AbstractLoginModule
public abstract class AbstractLoginModule
Abstract implementation of the LoginModule
providing common methods and constants implementation.
Field Summary | |
---|---|
javax.security.auth.callback.CallbackHandler |
callbackHandler
|
protected org.slf4j.Logger |
log
|
java.lang.String |
name
|
static java.lang.String |
OPTION_REALM
|
static java.lang.String |
OPTION_SKIP_ON_PREVIOUS_SUCCESS
|
static java.lang.String |
OPTION_USE_REALM_CALLBACK
|
java.util.Map |
options
|
char[] |
pswd
|
protected java.lang.String |
realm
The realm we login into. |
java.util.Map |
sharedState
|
static java.lang.String |
STATUS
|
static int |
STATUS_FAILED
|
static int |
STATUS_SKIPPED
|
static int |
STATUS_SUCCEDED
Deprecated. use STATUS_SUCCEEDED |
static int |
STATUS_SUCCEEDED
|
static int |
STATUS_UNAVAILABLE
|
javax.security.auth.Subject |
subject
|
boolean |
success
|
static java.lang.String |
TRY_FIRST_PASS
|
static java.lang.String |
TRY_MAPPED_PASS
|
static java.lang.String |
USE_FIRST_PASS
|
static java.lang.String |
USE_MAPPED_PASS
|
protected boolean |
useRealmCallback
Allow the client to define the realm he logs into. |
Constructor Summary | |
---|---|
AbstractLoginModule()
|
Method Summary | |
---|---|
boolean |
abort()
|
void |
addGroupName(java.lang.String groupName)
|
void |
addRoleName(java.lang.String roleName)
|
boolean |
commit()
Updates subject with ACL and other properties. |
java.util.Set |
getGroupNames()
|
java.util.Set |
getRoleNames()
|
int |
getSharedStatus()
|
protected boolean |
getSkip()
Tests if the option skip_on_previous_success is set to true and preceding LoginModule was successful. |
void |
initialize(javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.util.Map sharedState,
java.util.Map options)
|
boolean |
login()
|
boolean |
logout()
|
abstract boolean |
release()
Releases all associated memory. |
abstract void |
setACL()
Sets access control list from the user, roles and groups. |
abstract void |
setEntity()
Sets user details. |
void |
setGroupNames(java.util.Set names)
|
void |
setRoleNames(java.util.Set names)
|
void |
setSharedStatus(int status)
Sets shared status value to be used by subsequent LoginModule(s). |
abstract void |
validateUser()
Checks if the credentials exist in the repository. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String OPTION_SKIP_ON_PREVIOUS_SUCCESS
public static final java.lang.String OPTION_REALM
public static final java.lang.String OPTION_USE_REALM_CALLBACK
public static final java.lang.String STATUS
public static final int STATUS_SUCCEEDED
public static final int STATUS_SUCCEDED
public static final int STATUS_FAILED
public static final int STATUS_SKIPPED
public static final int STATUS_UNAVAILABLE
public static final java.lang.String TRY_FIRST_PASS
public static final java.lang.String USE_FIRST_PASS
public static final java.lang.String TRY_MAPPED_PASS
public static final java.lang.String USE_MAPPED_PASS
public javax.security.auth.Subject subject
public javax.security.auth.callback.CallbackHandler callbackHandler
public java.util.Map sharedState
public java.util.Map options
public java.lang.String name
public char[] pswd
protected java.lang.String realm
protected boolean useRealmCallback
public boolean success
protected org.slf4j.Logger log
Constructor Detail |
---|
public AbstractLoginModule()
Method Detail |
---|
public void initialize(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map sharedState, java.util.Map options)
initialize
in interface javax.security.auth.spi.LoginModule
public boolean login() throws javax.security.auth.login.LoginException
login
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean commit() throws javax.security.auth.login.LoginException
commit
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean abort() throws javax.security.auth.login.LoginException
abort
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public boolean logout() throws javax.security.auth.login.LoginException
logout
in interface javax.security.auth.spi.LoginModule
javax.security.auth.login.LoginException
public int getSharedStatus()
public void setSharedStatus(int status)
protected boolean getSkip()
public void setGroupNames(java.util.Set names)
public void addGroupName(java.lang.String groupName)
public java.util.Set getGroupNames()
public void setRoleNames(java.util.Set names)
public void addRoleName(java.lang.String roleName)
public java.util.Set getRoleNames()
public abstract boolean release()
public abstract void validateUser() throws javax.security.auth.login.LoginException
javax.security.auth.login.LoginException
- or specific subclasses to report failures.public abstract void setEntity()
public abstract void setACL()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |