Package net.shibboleth.idp.session.impl
Class UpdateSessionWithSPSession
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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
public class UpdateSessionWithSPSession extends AbstractProfileAction
An action that establishes a record of anSPSessionin an existingIdPSessionfor the client.The
SPSessionto add is obtained using a strategy function injected into the action.The existing session to modify is identified via a
SessionContextattached to theProfileRequestContext.An error interacting with the session layer will result in an
EventIds.IO_ERRORevent.- 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
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,SessionContext>sessionContextLookupStrategyLookup function for SessionContext.private SessionContextsessionCtxExisting or newly created SessionContext.private SessionManagersessionManagerSessionManager.private Function<ProfileRequestContext,SPSession>spSessionCreationStrategyA function that returns theSPSessionto add.
-
Constructor Summary
Constructors Constructor Description UpdateSessionWithSPSession()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)voidsetSessionContextLookupStrategy(Function<ProfileRequestContext,SessionContext> strategy)Set the lookup strategy for the SessionContext to access.voidsetSessionManager(SessionManager manager)Set theSessionManagerto use.voidsetSPSessionCreationStrategy(Function<ProfileRequestContext,SPSession> strategy)Set the creation function to use to obtain theSPSessionto add.-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
spSessionCreationStrategy
@Nonnull private Function<ProfileRequestContext,SPSession> spSessionCreationStrategy
A function that returns theSPSessionto add.
-
sessionManager
@NonnullAfterInit private SessionManager sessionManager
SessionManager.
-
sessionContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,SessionContext> sessionContextLookupStrategy
Lookup function for SessionContext.
-
sessionCtx
@Nullable private SessionContext sessionCtx
Existing or newly created SessionContext.
-
-
Method Detail
-
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
public void setSessionManager(@Nonnull SessionManager manager)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
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-