Package net.shibboleth.idp.session.impl
Class BasicSPSessionCreationStrategy
java.lang.Object
net.shibboleth.idp.session.impl.BasicSPSessionCreationStrategy
- All Implemented Interfaces:
Function<ProfileRequestContext,SPSession>
public class BasicSPSessionCreationStrategy extends Object implements Function<ProfileRequestContext,SPSession>
A function to create a
BasicSPSession
based on profile execution state.
This strategy is a default approach that uses a lookup strategy for a RelyingPartyContext
to obtain an issuer value, used as the SPSession
's relying party ID. The authentication flow ID
comes from the AuthenticationResult
in the AuthenticationContext
. The session has a
creation time based on the time of execution, and the expiration is based on a configurable lifetime.
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Class logger.private Function<ProfileRequestContext,RelyingPartyContext>
relyingPartyContextLookupStrategy
RelyingPartyContext lookup strategy.private Duration
sessionLifetime
Lifetime of sessions to create. -
Constructor Summary
Constructors Constructor Description BasicSPSessionCreationStrategy(Duration lifetime)
Constructor. -
Method Summary
Modifier and Type Method Description SPSession
apply(ProfileRequestContext input)
void
setRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set the strategy used to locate theRelyingPartyContext
to operate on.
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
sessionLifetime
Lifetime of sessions to create. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyRelyingPartyContext lookup strategy.
-
-
Constructor Details
-
BasicSPSessionCreationStrategy
Constructor.- Parameters:
lifetime
- determines expiration ofSPSession
to be created
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)Set the strategy used to locate theRelyingPartyContext
to operate on.- Parameters:
strategy
- lookup strategy
-
apply
- Specified by:
apply
in interfaceFunction<ProfileRequestContext,SPSession>
-