Package net.shibboleth.idp.session.impl
Class PopulateLogoutPropagationContext
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.PopulateLogoutPropagationContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Profile action that creates a
LogoutPropagationContext containing SPSession to be destroyed. The
SP sessions may be populated:
- By reference - via SessionKey request parameter that looks up one
SPSessionfrom aLogoutContextstored in the HTTP session. - By value - reconstitutes an encrypted
SPSessionobject in SPSession request parameter. - By lookup strategy.
- Event:
- SessionNotFound,
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.UNABLE_TO_DECODE - Postcondition:
- If an
SPSessionis found, then aLogoutPropagationContextwill be populated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionLookup/creation function for LogoutPropagationContext.private DataSealerDataSealerto use.private final org.slf4j.LoggerClass logger.private SPSessionSPSessionto operate on.private static final StringName of parameter containing session by reference.private static final StringName of parameter containing session by reference.private static final StringName of parameter containing session by value.private StringThe value used to look up a session by reference.private Function<ProfileRequestContext,SPSession> Lookup strategy for session.private SPSessionSerializerRegistryMappings between a SPSession type and a serializer implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) private SPSessiongetSessionByReference(RequestContext requestContext, String key) Get anSPSessionby reference.private SPSessiongetSessionByValue(String sessionVal) Get anSPSessionby value.voidsetDataSealer(DataSealer sealer) Set theDataSealerto use.voidsetLogoutPropagationContextCreationStrategy(Function<ProfileRequestContext, LogoutPropagationContext> strategy) Set the creation/lookup strategy for theLogoutPropagationContext.voidSet a lookup strategy to use to obtain the session to populate.voidSet theSPSessionSerializerRegistryto use.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, doInitialize, 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
-
SESSION_NOT_FOUND
Name of parameter containing session by reference.- See Also:
-
SESSION_PARAM_BYREF
Name of parameter containing session by reference.- See Also:
-
SESSION_PARAM_BYVAL
Name of parameter containing session by value.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
dataSealer
DataSealerto use. -
spSessionSerializerRegistry
Mappings between a SPSession type and a serializer implementation. -
contextCreationStrategy
Lookup/creation function for LogoutPropagationContext. -
sessionLookupStrategy
Lookup strategy for session. -
session
SPSessionto operate on. -
sessionKey
The value used to look up a session by reference.
-
-
Constructor Details
-
PopulateLogoutPropagationContext
public PopulateLogoutPropagationContext()Constructor.
-
-
Method Details
-
setSPSessionSerializerRegistry
Set theSPSessionSerializerRegistryto use.- Parameters:
registry- a registry of SPSession class to serializer mappings
-
setLogoutPropagationContextCreationStrategy
public void setLogoutPropagationContextCreationStrategy(@Nonnull Function<ProfileRequestContext, LogoutPropagationContext> strategy) Set the creation/lookup strategy for theLogoutPropagationContext.- Parameters:
strategy- creation/lookup strategy
-
setSessionLookupStrategy
Set a lookup strategy to use to obtain the session to populate.- Parameters:
strategy- lookup strategy
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
getSessionByReference
@Nonnull private SPSession getSessionByReference(@Nonnull RequestContext requestContext, @Nonnull String key) throws MessageException Get anSPSessionby reference.- Parameters:
requestContext- Spring request contextkey- session key identifying the SP session- Returns:
- the SP session
- Throws:
MessageException- if an error occurs
-
getSessionByValue
@Nonnull private SPSession getSessionByValue(@Nonnull String sessionVal) throws MessageDecodingException Get anSPSessionby value.- Parameters:
sessionVal- serialized SP session- Returns:
- the SP session
- Throws:
MessageDecodingException- if an error occurs