public abstract class AbstractLoginModule extends Object implements LoginModule
LoginModule
providing common methods and constants implementation.Modifier and Type | Field and Description |
---|---|
CallbackHandler |
callbackHandler |
protected org.slf4j.Logger |
log |
String |
name |
static String |
OPTION_REALM |
static String |
OPTION_SKIP_ON_PREVIOUS_SUCCESS |
static String |
OPTION_USE_REALM_CALLBACK |
Map<String,Object> |
options |
char[] |
pswd |
protected info.magnolia.cms.security.Realm |
realm
The realm we login into.
|
Map<String,Object> |
sharedState |
static String |
STATUS |
static int |
STATUS_FAILED |
static int |
STATUS_SKIPPED |
static int |
STATUS_SUCCEDED
Deprecated.
since 5.3.3 use STATUS_SUCCEEDED
|
static int |
STATUS_SUCCEEDED |
static int |
STATUS_UNAVAILABLE |
Subject |
subject |
boolean |
success |
static String |
TRY_FIRST_PASS |
static String |
TRY_MAPPED_PASS |
static String |
USE_FIRST_PASS |
static String |
USE_MAPPED_PASS |
protected boolean |
useRealmCallback
Allow the client to define the realm he logs into.
|
Constructor and Description |
---|
AbstractLoginModule() |
Modifier and Type | Method and Description |
---|---|
boolean |
abort() |
void |
addGroupName(String groupName) |
void |
addRoleName(String roleName) |
boolean |
commit()
Updates subject with ACL and other properties.
|
Set<String> |
getGroupNames() |
Set<String> |
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(Subject subject,
CallbackHandler callbackHandler,
Map sharedState,
Map options) |
boolean |
login() |
boolean |
logout() |
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(Set<String> names) |
void |
setRoleNames(Set<String> 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.
|
public static final String OPTION_SKIP_ON_PREVIOUS_SUCCESS
public static final String OPTION_REALM
public static final String OPTION_USE_REALM_CALLBACK
public static final String STATUS
public static final int STATUS_SUCCEEDED
@Deprecated 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 String TRY_FIRST_PASS
public static final String USE_FIRST_PASS
public static final String TRY_MAPPED_PASS
public static final String USE_MAPPED_PASS
public Subject subject
public CallbackHandler callbackHandler
public String name
public char[] pswd
protected info.magnolia.cms.security.Realm realm
protected boolean useRealmCallback
public boolean success
protected org.slf4j.Logger log
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
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 int getSharedStatus()
public void setSharedStatus(int status)
protected boolean getSkip()
public void addGroupName(String groupName)
public void addRoleName(String roleName)
public boolean release()
public abstract void validateUser() throws LoginException
LoginException
- or specific subclasses to report failures.public abstract void setEntity()
public abstract void setACL()
Copyright © 2003–2015 Magnolia International Ltd.. All rights reserved.