Package net.shibboleth.idp.session.impl
Class PopulateLogoutPropagationContext
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.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
SPSession
from aLogoutContext
stored in the HTTP session. - By value - reconstitutes an encrypted
SPSession
object in SPSession request parameter. - By lookup strategy.
- Event:
- SessionNotFound,
EventIds.PROCEED_EVENT_ID
,EventIds.INVALID_PROFILE_CTX
,EventIds.UNABLE_TO_DECODE
- Postcondition:
- If an
SPSession
is found, then aLogoutPropagationContext
will be populated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionLookup/creation function for LogoutPropagationContext.private DataSealer
DataSealer
to use.private final org.slf4j.Logger
Class logger.private SPSession
SPSession
to operate on.private static final String
Name of parameter containing session by reference.private static final String
Name of parameter containing session by reference.private static final String
Name of parameter containing session by value.private String
The value used to look up a session by reference.private Function<ProfileRequestContext,
SPSession> Lookup strategy for session.private SPSessionSerializerRegistry
Mappings between a SPSession type and a serializer implementation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doExecute
(ProfileRequestContext profileRequestContext) protected boolean
doPreExecute
(ProfileRequestContext profileRequestContext) private SPSession
getSessionByReference
(RequestContext requestContext, String key) Get anSPSession
by reference.private SPSession
getSessionByValue
(String sessionVal) Get anSPSession
by value.void
setDataSealer
(DataSealer sealer) Set theDataSealer
to use.void
setLogoutPropagationContextCreationStrategy
(Function<ProfileRequestContext, LogoutPropagationContext> strategy) Set the creation/lookup strategy for theLogoutPropagationContext
.void
Set a lookup strategy to use to obtain the session to populate.void
Set theSPSessionSerializerRegistry
to use.Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, 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, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, setHttpServletRequest, setHttpServletRequestSupplier, setHttpServletResponse, setHttpServletResponseSupplier
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, 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 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
DataSealer
to use. -
spSessionSerializerRegistry
Mappings between a SPSession type and a serializer implementation. -
contextCreationStrategy
Lookup/creation function for LogoutPropagationContext. -
sessionLookupStrategy
Lookup strategy for session. -
session
SPSession
to operate on. -
sessionKey
The value used to look up a session by reference.
-
-
Constructor Details
-
PopulateLogoutPropagationContext
public PopulateLogoutPropagationContext()Constructor.
-
-
Method Details
-
setDataSealer
Set theDataSealer
to use.- Parameters:
sealer
- theDataSealer
to use
-
setSPSessionSerializerRegistry
Set theSPSessionSerializerRegistry
to 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:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-
getSessionByReference
@Nonnull private SPSession getSessionByReference(@Nonnull RequestContext requestContext, @Nonnull String key) throws MessageException Get anSPSession
by 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 anSPSession
by value.- Parameters:
sessionVal
- serialized SP session- Returns:
- the SP session
- Throws:
MessageDecodingException
- if an error occurs
-