Package net.shibboleth.idp.session.impl
Class UpdateSessionWithSPSession
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.session.impl.UpdateSessionWithSPSession
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
An action that establishes a record of an
SPSession in an existing IdPSession for the client.
The SPSession to add is obtained using a strategy function injected into the action.
The existing session to modify is identified via a SessionContext attached to the
ProfileRequestContext.
An error interacting with the session layer will result in an EventIds.IO_ERROR event.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.IO_ERROR- Postcondition:
- If ProfileRequestContext.getSubcontext(SessionContext.class).getIdPSession() != null and a non-null SPSession is supplied by the strategy function, then the steps above are performed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerClass logger.private Function<ProfileRequestContext,SessionContext> Lookup function for SessionContext.private SessionContextExisting or newly created SessionContext.private SessionManagerSessionManager.private Function<ProfileRequestContext,SPSession> A function that returns theSPSessionto add. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSet the lookup strategy for the SessionContext to access.voidsetSessionManager(SessionManager manager) Set theSessionManagerto use.voidSet the creation function to use to obtain theSPSessionto add.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
spSessionCreationStrategy
A function that returns theSPSessionto add. -
sessionManager
SessionManager. -
sessionContextLookupStrategy
Lookup function for SessionContext. -
sessionCtx
Existing or newly created SessionContext.
-
-
Constructor Details
-
UpdateSessionWithSPSession
public UpdateSessionWithSPSession()Constructor.
-
-
Method Details
-
setSPSessionCreationStrategy
public void setSPSessionCreationStrategy(@Nonnull Function<ProfileRequestContext, SPSession> strategy) Set the creation function to use to obtain theSPSessionto add.- Parameters:
strategy- creation function to use
-
setSessionManager
Set theSessionManagerto use.- Parameters:
manager- session manager to use
-
setSessionContextLookupStrategy
public void setSessionContextLookupStrategy(@Nonnull Function<ProfileRequestContext, SessionContext> strategy) Set the lookup strategy for the SessionContext to access.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-