public class UpdateSessionWithAuthenticationResult extends AbstractAuthenticationAction
AuthenticationResult
in an IdPSession for the client, either by updating an existing session or creating a new one.
A new AuthenticationResult may be added to the session, or the last activity
time of an existing one updated. A new one will only be added if the authentication context indicates that the
result is "cacheable".
An existing session is identified via a SessionContext attached to the ProfileRequestContext.
If a new session is created, it will be placed into a SessionContext, creating it if necessary, with the
principal name coming from a SubjectContext.
An error interacting with the session layer will result in an EventIds.IO_ERROR event.
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_PROFILE_CTX, EventIds.IO_ERRORProfileRequestContext.getSubcontext(AuthenticationContext.class) != null
| Modifier and Type | Field and Description |
|---|---|
private Logger |
log
Class logger.
|
private com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SessionContext> |
sessionContextCreationStrategy
Lookup/creation function for SessionContext.
|
private SessionContext |
sessionCtx
Existing or newly created SessionContext.
|
private SessionManager |
sessionManager
SessionManager.
|
private com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SubjectContext> |
subjectContextLookupStrategy
Lookup function for SubjectContext.
|
private SubjectContext |
subjectCtx
Existing SubjectContext.
|
| Constructor and Description |
|---|
UpdateSessionWithAuthenticationResult()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
createIdPSession(AuthenticationContext authenticationContext)
Create a new session and populate the SessionContext.
|
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
protected void |
doInitialize() |
protected boolean |
doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext,
AuthenticationContext authenticationContext) |
void |
setSessionContextCreationStrategy(com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SessionContext> strategy)
Set the lookup/creation strategy for the SessionContext to update.
|
void |
setSessionManager(SessionManager manager)
Set the
SessionManager to use. |
void |
setSubjectContextLookupStrategy(com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SubjectContext> strategy)
Set the lookup strategy for the SubjectContext to access.
|
private void |
updateIdPSession(AuthenticationContext authenticationContext,
IdPSession session)
Update an existing session.
|
doExecute, doPreExecute, setLookupStrategydoExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, initialize, isDestroyed, isInitialized@NonnullAfterInit private SessionManager sessionManager
@Nonnull private com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SessionContext> sessionContextCreationStrategy
@Nonnull private com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SubjectContext> subjectContextLookupStrategy
@Nullable private SessionContext sessionCtx
@Nullable private SubjectContext subjectCtx
public UpdateSessionWithAuthenticationResult()
public void setSessionManager(@Nonnull SessionManager manager)
SessionManager to use.manager - session manager to usepublic void setSessionContextCreationStrategy(@Nonnull com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SessionContext> strategy)
strategy - creation/lookup strategypublic void setSubjectContextLookupStrategy(@Nonnull com.google.common.base.Function<org.opensaml.profile.context.ProfileRequestContext,SubjectContext> strategy)
strategy - lookup strategyprotected void doInitialize()
throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
doInitialize in class net.shibboleth.utilities.java.support.component.AbstractInitializableComponentnet.shibboleth.utilities.java.support.component.ComponentInitializationExceptionprotected boolean doPreExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doPreExecute in class AbstractAuthenticationActionprotected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext)
doExecute in class AbstractAuthenticationActionprivate void updateIdPSession(@Nonnull AuthenticationContext authenticationContext, @Nonnull IdPSession session) throws SessionException
If the result is the product of an attempted flow, then it's added to the session. If reused, its last activity time is updated.
authenticationContext - current authentication contextsession - session to updateSessionException - if an error occurs updating the sessionprivate void createIdPSession(@Nonnull AuthenticationContext authenticationContext) throws SessionException
authenticationContext - current authentication contextSessionException - if an error occurs creating the sessionCopyright © 1999–2014. All rights reserved.