A
- type of AppUser
public class ServletSessionService<A extends AppUser> extends AbstractSessionService<A>
ServletService
is given an opportunity to extract the current user from the HTTP request allowing alternate
authentication mechanisms.ServletService
![]() |
![]() |
![]() |
![]() |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BECOME_USER_ROLE |
static java.lang.String |
PERSON_RELATIONSHIP_TABLE |
protected static java.lang.String |
SUPER_PERSON_ID_ATTR |
static java.lang.String |
WTMP_ID |
static java.lang.String |
WTMP_TABLE_PROP |
ALLOW_UNKNOWN_RELATIONSHIP_IN_OR_FEATURE, APPLY_DEFAULT_PERSON_RELATIONSHIP_FILTER, APPLY_DEFAULT_TARGET_RELATIONSHIP_FILTER, auth_time_tag, auth_type_tag, CACHE_RELATIONSHIP_FEATURE, person_tag, ROLE_FIELD, ROLE_LIST_CONFIG, ROLE_PERSON_ID, ROLE_TABLE, TOGGLE_ROLES_FEATURE, USE_ROLE_PREFIX
conn
ADMIN_ROLE
Constructor and Description |
---|
ServletSessionService(AppContext c) |
Modifier and Type | Method and Description |
---|---|
void |
addSecurityContext(java.util.Map att)
Add context parameters for security logging.
|
protected boolean |
canLogin(A person)
extension point for canLogin check.
|
boolean |
canSU(A new_person) |
void |
clearCurrentPerson()
clears all record of the current person.
|
java.lang.Object |
getAttribute(java.lang.String key)
retrieve an object stored in the session.
|
java.lang.String |
getName()
Get the Name for the current user.
|
protected java.lang.Integer |
getPersonID()
Get the ID of the ccurrent person.
|
PersonRelationship<A> |
getPersonRelationship() |
A |
getSuperPerson() |
java.lang.Integer |
getWtmpID() |
WtmpManager |
getWtmpManager() |
boolean |
isSU() |
void |
logOut()
Clear current person and any saved state
|
protected A |
lookupPerson()
extracted method to look up person from the cached id.
|
void |
removeAttribute(java.lang.String key)
remove object from session
|
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Store an object in the session.
|
void |
setCrossCookie(WtmpManager man,
WtmpManager.Wtmp w) |
void |
setCurrentPerson(A person)
Set the current person
|
protected void |
setCurrentPersonNoWtmp(A person) |
void |
setNameHint(java.lang.String name)
Set a name hint in the session.
|
void |
setUseSession(boolean use) |
protected boolean |
shortcutTestRole(java.lang.String role)
perform a non-cached role-check.
|
void |
su(A new_person) |
addRoleByID, cacheRole, canHaveRole, canHaveRole, cleanup, flushRelationships, getApplyToggle, getAuthenticationTime, getAuthenticationType, getCurrentPerson, getDefaultFactoryClass, getExplicitRoles, getGlobalRoleFilter, getGlobalRoleFilter, getLocale, getLoginFactory, getLoginTable, getPersonInRelationshipRoleFilter, getPersonInRoleFilter, getRelationshipRoleFilter, getRelationshipRoleFilter, getStandardRoles, getTargetInRelationshipRoleFilter, getTimeZone, getToggle, getToggleMap, getToggleRoles, getType, hasRelationship, hasRelationship, hasRole, haveCurrentUser, isAuthenticated, isCurrentPerson, makeDirectPersonInRelationshipRoleFilter, makeDirectRelationshipRoleFilter, makeNamedFilter, makePersonInRelationshipRoleFilter, makeRelationshipRoleFilter, makeToggleMap, mapRoleName, rawRoleQuery, removeRoleByID, setApplyToggle, setAuthenticationTime, setAuthenticationType, setCurrentPerson, setCurrentRoleToggle, setRole, setTempRole, setToggle, setupRoleTable, testRole, toggleRole, toString
getContext, getLogger, resetLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canHaveRoleFromList, hasRelationship, hasRoleFromList, personHasRelationship
getContext
public static final java.lang.String WTMP_TABLE_PROP
public static final java.lang.String PERSON_RELATIONSHIP_TABLE
public static final java.lang.String BECOME_USER_ROLE
protected static final java.lang.String SUPER_PERSON_ID_ATTR
public static final java.lang.String WTMP_ID
public ServletSessionService(AppContext c)
public java.lang.String getName()
SessionService
getName
in interface SessionService<A extends AppUser>
getName
in class AbstractSessionService<A extends AppUser>
protected boolean shortcutTestRole(java.lang.String role)
AbstractSessionService
shortcutTestRole
in class AbstractSessionService<A extends AppUser>
public void setAttribute(java.lang.String key, java.lang.Object value)
SessionService
AppContext
might have a shorter lifetime.
tpublic void removeAttribute(java.lang.String key)
SessionService
public java.lang.Object getAttribute(java.lang.String key)
SessionService
public WtmpManager getWtmpManager()
protected A lookupPerson()
AbstractSessionService
lookupPerson
in class AbstractSessionService<A extends AppUser>
public java.lang.Integer getWtmpID()
public void clearCurrentPerson()
AbstractSessionService
clearCurrentPerson
in interface SessionService<A extends AppUser>
clearCurrentPerson
in class AbstractSessionService<A extends AppUser>
public void logOut()
SessionService
logOut
in interface SessionService<A extends AppUser>
logOut
in class AbstractSessionService<A extends AppUser>
public A getSuperPerson()
public void setCurrentPerson(A person)
SessionService
setCurrentPerson
in interface SessionService<A extends AppUser>
setCurrentPerson
in class AbstractSessionService<A extends AppUser>
public void setNameHint(java.lang.String name)
name
- protected void setCurrentPersonNoWtmp(A person)
person
- public void setCrossCookie(WtmpManager man, WtmpManager.Wtmp w)
man
- w
- protected java.lang.Integer getPersonID()
AbstractSessionService
AbstractSessionService.haveCurrentUser()
and AbstractSessionService.getCurrentPerson()
getPersonID
in class AbstractSessionService<A extends AppUser>
public void su(A new_person)
public boolean canSU(A new_person)
public PersonRelationship<A> getPersonRelationship()
public boolean isSU()
public void setUseSession(boolean use)
protected boolean canLogin(A person)
AbstractSessionService
canLogin
in class AbstractSessionService<A extends AppUser>
public void addSecurityContext(java.util.Map att)
SessionService
addSecurityContext
in interface SessionService<A extends AppUser>
addSecurityContext
in class AbstractSessionService<A extends AppUser>