Package net.shibboleth.idp.saml.session.impl

# Class SAML1SPSessionCreationStrategy

java.lang.Object
net.shibboleth.idp.saml.session.impl.SAML1SPSessionCreationStrategy

All Implemented Interfaces:
  `Function<ProfileRequestContext,SPSession>`

public class SAML1SPSessionCreationStrategy extends Object implements Function<ProfileRequestContext,SPSession>
A function to create a `SAML1SPSession` 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 final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
RelyingPartyContext lookup strategy.
`private final Duration`
`sessionLifetime`
Lifetime of sessions to create.

## Constructor Summary

Constructors
Constructor
Description
`SAML1SPSessionCreationStrategy(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 the `RelyingPartyContext` to operate on.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.function.Function

`andThen, compose`

## Field Details

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### sessionLifetime

@Nonnull private final Duration sessionLifetime
Lifetime of sessions to create.

### relyingPartyContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
RelyingPartyContext lookup strategy.

## Constructor Details

### SAML1SPSessionCreationStrategy

public SAML1SPSessionCreationStrategy(@Nonnull Duration lifetime)
Constructor.

Parameters:
  `lifetime` - determines expiration of `SPSession` to be created

## Method Details

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set the strategy used to locate the `RelyingPartyContext` to operate on.

Parameters:
  `strategy` - lookup strategy

### apply

@Nullable public SPSession apply(@Nullable ProfileRequestContext input)

Specified by:
  `apply` in interface `Function<ProfileRequestContext,SPSession>`