Package net.shibboleth.idp.session.impl
Class PopulateSessionContext
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class PopulateSessionContext extends AbstractProfileAction
A profile action that populates aSessionContextwith an active, validIdPSession.- Event:
EventIds.PROCEED_EVENT_ID- Postcondition:
- As above, and the session will be bound to the client's address if the underlying
SessionResolveris configured to do so.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,String>addressLookupStrategyFunction to override source of address to bind session.private org.slf4j.LoggerlogClass logger.private Function<ProfileRequestContext,SessionContext>sessionContextCreationStrategyCreation/lookup function for SessionContext.private SessionResolversessionResolverSession resolver.private Function<ProfileRequestContext,CriteriaSet>sessionResolverCriteriaStrategyFunction to returnCriteriaSetto give to session resolver.
-
Constructor Summary
Constructors Constructor Description PopulateSessionContext()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()voidsetAddressLookupStrategy(Function<ProfileRequestContext,String> strategy)Set an optional lookup strategy to obtain the address to which to bind the session.voidsetSessionContextCreationStrategy(Function<ProfileRequestContext,SessionContext> strategy)Set the creation/lookup strategy for the SessionContext to populate.voidsetSessionResolver(SessionResolver resolver)Set theSessionResolverto use.voidsetSessionResolverCriteriaStrategy(Function<ProfileRequestContext,CriteriaSet> strategy)Set the strategy for building theCriteriaSetto feed into theSessionResolver.-
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
doPreExecute, 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.
-
sessionResolver
@NonnullAfterInit private SessionResolver sessionResolver
Session resolver.
-
sessionContextCreationStrategy
@Nonnull private Function<ProfileRequestContext,SessionContext> sessionContextCreationStrategy
Creation/lookup function for SessionContext.
-
sessionResolverCriteriaStrategy
@Nonnull private Function<ProfileRequestContext,CriteriaSet> sessionResolverCriteriaStrategy
Function to returnCriteriaSetto give to session resolver.
-
addressLookupStrategy
@Nullable private Function<ProfileRequestContext,String> addressLookupStrategy
Function to override source of address to bind session.
-
-
Method Detail
-
setSessionResolver
public void setSessionResolver(@Nonnull SessionResolver resolver)Set theSessionResolverto use.- Parameters:
resolver- session resolver to use
-
setSessionContextCreationStrategy
public void setSessionContextCreationStrategy(@Nonnull Function<ProfileRequestContext,SessionContext> strategy)Set the creation/lookup strategy for the SessionContext to populate.- Parameters:
strategy- creation/lookup strategy
-
setAddressLookupStrategy
public void setAddressLookupStrategy(@Nullable Function<ProfileRequestContext,String> strategy)Set an optional lookup strategy to obtain the address to which to bind the session.- Parameters:
strategy- lookup strategy- Since:
- 4.2.0
-
setSessionResolverCriteriaStrategy
public void setSessionResolverCriteriaStrategy(@Nonnull Function<ProfileRequestContext,CriteriaSet> strategy)Set the strategy for building theCriteriaSetto feed into theSessionResolver.- Parameters:
strategy- building strategy
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-