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, false) != null
| Modifier and Type | Field and Description |
|---|---|
private Logger |
log
Class logger.
|
private SessionContext |
sessionCtx
Existing or newly created SessionContext.
|
private SessionManager |
sessionManager
SessionManager.
|
private SubjectContext |
subjectCtx
Existing SubjectContext.
|
| Constructor and Description |
|---|
UpdateSessionWithAuthenticationResult() |
| 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 |
setSessionManager(SessionManager manager)
Set the
SessionManager to use. |
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
@Nullable private SessionContext sessionCtx
@Nullable private SubjectContext subjectCtx
public UpdateSessionWithAuthenticationResult()
public void setSessionManager(@Nonnull SessionManager manager)
SessionManager to use.manager - session manager to useprotected 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.