Class OIDCRPSessionCreationStrategy
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.plugin.oidc.op.session.impl.OIDCRPSessionCreationStrategy
- All Implemented Interfaces:
Function<ProfileRequestContext,,SPSession> Component,DestructableComponent,InitializableComponent
public class OIDCRPSessionCreationStrategy
extends AbstractInitializableComponent
implements Function<ProfileRequestContext,SPSession>
A function to create a
OIDCRPSession based on profile execution state.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,ClientID> Lookup strategy used to obtain the client id value.private final org.slf4j.LoggerClass logger.Lookup strategy for OIDC metadata context.Lookup strategy for OIDC authentication response context.private final DurationLifetime of sessions to create. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(ProfileRequestContext profileRequestContext) protected StringgetIssuer(TokenClaimsSet tokenClaimsSet, IDTokenClaimsSet idTokenClaimsSet) Get issuer from the given token claims set if found, and from the given ID token claims set if not.protected StringgetSessionIdentifier(TokenClaimsSet tokenClaimsSet, IDTokenClaimsSet idTokenClaimsSet) Get session identifier from the given token claims set if found, and from the given ID token claims set if not.protected StringgetSubject(TokenClaimsSet tokenClaimsSet, IDTokenClaimsSet idTokenClaimsSet) Get subject from the given token claims set if found, and from the given ID token claims set if not.protected booleanisSupportsLogoutPropagation(ProfileRequestContext profileRequestContext) Check if theOIDCClientMetadataattached to the given PRC contains a front- or back-channel logout URI.voidSet the lookup strategy used to obtain the client id value.voidSet the lookup strategy for OIDC metadata context.voidsetOidcResponseContextLookupStrategy(Function<ProfileRequestContext, OIDCAuthenticationResponseContext> strategy) Set the lookup strategy for OIDC authentication response context.Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
sessionLifetime
Lifetime of sessions to create. -
oidcMetadataContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,OIDCMetadataContext> oidcMetadataContextLookupStrategyLookup strategy for OIDC metadata context. -
oidcResponseContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,OIDCAuthenticationResponseContext> oidcResponseContextLookupStrategyLookup strategy for OIDC authentication response context. -
clientIDLookupStrategy
Lookup strategy used to obtain the client id value.
-
-
Constructor Details
-
OIDCRPSessionCreationStrategy
Constructor.- Parameters:
lifetime- determines upper bound for expiration ofOIDCRPSessionto be created
-
-
Method Details
-
setOidcMetadataContextLookupStrategy
public void setOidcMetadataContextLookupStrategy(@Nonnull Function<ProfileRequestContext, OIDCMetadataContext> strategy) Set the lookup strategy for OIDC metadata context.- Parameters:
strategy- lookup strategy
-
setOidcResponseContextLookupStrategy
public void setOidcResponseContextLookupStrategy(@Nonnull Function<ProfileRequestContext, OIDCAuthenticationResponseContext> strategy) Set the lookup strategy for OIDC authentication response context.- Parameters:
strategy- lookup strategy
-
setClientIDLookupStrategy
Set the lookup strategy used to obtain the client id value.- Parameters:
strategy- lookup strategy
-
apply
- Specified by:
applyin interfaceFunction<ProfileRequestContext,SPSession>
-
getSessionIdentifier
@Nullable protected String getSessionIdentifier(@Nullable TokenClaimsSet tokenClaimsSet, @Nullable IDTokenClaimsSet idTokenClaimsSet) Get session identifier from the given token claims set if found, and from the given ID token claims set if not.- Parameters:
tokenClaimsSet- token claims set used as a primary sourceidTokenClaimsSet- ID token claims set used as a secondary source- Returns:
- session identifier value, or null if not found from neither of the sources
-
getIssuer
@Nullable protected String getIssuer(@Nullable TokenClaimsSet tokenClaimsSet, @Nullable IDTokenClaimsSet idTokenClaimsSet) Get issuer from the given token claims set if found, and from the given ID token claims set if not.- Parameters:
tokenClaimsSet- token claims set used as a primary sourceidTokenClaimsSet- ID token claims set used as a secondary source- Returns:
- issuer value, or null if not found from neither of the sources
-
getSubject
@Nullable protected String getSubject(@Nullable TokenClaimsSet tokenClaimsSet, @Nullable IDTokenClaimsSet idTokenClaimsSet) Get subject from the given token claims set if found, and from the given ID token claims set if not.- Parameters:
tokenClaimsSet- token claims set used as a primary sourceidTokenClaimsSet- ID token claims set used as a secondary source- Returns:
- subject value, or null if not found from neither of the sources
-
isSupportsLogoutPropagation
protected boolean isSupportsLogoutPropagation(@Nullable ProfileRequestContext profileRequestContext) Check if theOIDCClientMetadataattached to the given PRC contains a front- or back-channel logout URI.- Parameters:
profileRequestContext- The profile request context- Returns:
- true iff the attached metadata contains a front- or back-channel logout URI
-