Class DefaultOIDCLogoutConfiguration

All Implemented Interfaces:
InterceptorAwareProfileConfiguration, OIDCLogoutProfileConfiguration, OIDCProfileConfiguration, OAuth2InterceptorAwareProfileConfiguration, OAuth2ProfileConfiguration, OAuth2TokenEncryptionProfileConfiguration, ConditionalProfileConfiguration, OverriddenIssuerProfileConfiguration, ProfileConfiguration, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

Implementation of a profile configuration for the OpenID Connect logout.
Since:
3.1.0
  • Field Details

    • PROFILE_COUNTER

      @Nonnull @NotEmpty public static final String PROFILE_COUNTER
      OIDC Back-Channel Logout profile counter name.
      See Also:
    • issuerLookupStrategy

      @Nonnull private Function<ProfileRequestContext,String> issuerLookupStrategy
      Lookup function to override issuer value.
    • encryptionOptionalPredicate

      @Nonnull private Predicate<ProfileRequestContext> encryptionOptionalPredicate
      Whether encryption is optional in the face of no key, etc.
    • preferFrontChannelPredicate

      @Nonnull private Predicate<ProfileRequestContext> preferFrontChannelPredicate
      Whether encryption is optional in the face of no key, etc.
    • frontChannelSuccessPredicate

      @Nonnull private Predicate<ProfileRequestContext> frontChannelSuccessPredicate
      Whether to consider front-channel logout propagation successful.
    • revokeTokensPredicate

      @Nonnull private Predicate<ProfileRequestContext> revokeTokensPredicate
      Whether to revoke the tokens related to the session to be logged out.
    • requireIdTokenHintPredicate

      @Nonnull private Predicate<ProfileRequestContext> requireIdTokenHintPredicate
      Whether to require the use of id_token_hint in RP-initiated logout parameters.
    • logoutHintMatchingStrategyLookupStrategy

      @Nonnull private Function<ProfileRequestContext,BiPredicate<String,SPSession>> logoutHintMatchingStrategyLookupStrategy
      Lookup function to the RP-initiated logout's logout_hint parameter.
  • Constructor Details

    • DefaultOIDCLogoutConfiguration

      public DefaultOIDCLogoutConfiguration()
      Constructor.
    • DefaultOIDCLogoutConfiguration

      public DefaultOIDCLogoutConfiguration(@Nonnull @NotEmpty String profileId)
      Creates a new configuration instance.
      Parameters:
      profileId - Unique profile identifier.
  • Method Details

    • getIssuer

      @Nullable @NotEmpty public String getIssuer(@Nullable ProfileRequestContext profileRequestContext)
      Specified by:
      getIssuer in interface OverriddenIssuerProfileConfiguration
    • setIssuer

      public void setIssuer(@Nullable @NotEmpty String issuer)
      Set overridden issuer value.
      Parameters:
      issuer - issuer value
    • setIssuerLookupStrategy

      public void setIssuerLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
      Sets lookup strategy for overridden issuer value.
      Parameters:
      strategy - lookup strategy
    • isEncryptionOptional

      public boolean isEncryptionOptional(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OAuth2TokenEncryptionProfileConfiguration
      Get whether encryption is optional in the face of a missing key, etc.
      Specified by:
      isEncryptionOptional in interface OAuth2TokenEncryptionProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      true iff encryption is optional
    • setEncryptionOptional

      public void setEncryptionOptional(boolean flag)
      Set whether encryption is optional in the face of a missing key, etc.
      Parameters:
      flag - flag to set
    • setEncryptionOptionalPredicate

      public void setEncryptionOptionalPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether encryption is optional in the face of a missing key, etc.
      Parameters:
      condition - condition to set
    • isPreferFrontChannel

      public boolean isPreferFrontChannel(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OIDCLogoutProfileConfiguration
      Get whether to prefer front-channel if both are defined for the RP.
      Specified by:
      isPreferFrontChannel in interface OIDCLogoutProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      true iff front-channel is to be preferred
    • setPreferFrontChannel

      public void setPreferFrontChannel(boolean flag)
      Set whether to prefer front-channel if both are defined for the RP.
      Parameters:
      flag - flag to set
    • setPreferFrontChannelPredicate

      public void setPreferFrontChannelPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether to prefer front-channel if both are defined for the RP.
      Parameters:
      condition - condition to set
    • isFrontChannelSuccess

      public boolean isFrontChannelSuccess(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OIDCLogoutProfileConfiguration
      Get whether to consider front-channel logout propagation successful.
      Specified by:
      isFrontChannelSuccess in interface OIDCLogoutProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      true iff front-channel propagation considered as successful
    • setFrontChannelSuccess

      public void setFrontChannelSuccess(boolean flag)
      Set whether to consider front-channel logout propagation successful.
      Parameters:
      flag - flag to set
    • setFrontChannelSuccessPredicate

      public void setFrontChannelSuccessPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether to consider front-channel logout propagation successful.
      Parameters:
      condition - condition to set
    • isRevokeTokens

      public boolean isRevokeTokens(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OIDCLogoutProfileConfiguration
      Get whether to revoke the tokens related to the session to be logged out.
      Specified by:
      isRevokeTokens in interface OIDCLogoutProfileConfiguration
      Parameters:
      profileRequestContext - current profile request context
      Returns:
      true iff the tokens are to be revoked
    • setRevokeTokens

      public void setRevokeTokens(boolean flag)
      Set whether to revoke the tokens related to the session to be logged out.
      Parameters:
      flag - flag to set
    • setRevokeTokensPredicate

      public void setRevokeTokensPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether to revoke the tokens related to the session to be logged out.
      Parameters:
      condition - condition to set
    • isRequireIdTokenHint

      public boolean isRequireIdTokenHint(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OIDCLogoutProfileConfiguration
      Get whether to require the use of id_token_hint in an OIDC RP-initiated logout sequence.
      Specified by:
      isRequireIdTokenHint in interface OIDCLogoutProfileConfiguration
      Parameters:
      profileRequestContext - profile request context
      Returns:
      true iff the use of id_token_hint is required
    • setRequireIdTokenHint

      public void setRequireIdTokenHint(boolean flag)
      Set whether to to require the use of id_token_hint in an OIDC RP-initiated logout sequence.
      Parameters:
      flag - flag to set
    • setRequireIdTokenHintPredicate

      public void setRequireIdTokenHintPredicate(@Nonnull Predicate<ProfileRequestContext> condition)
      Set a condition to determine whether to to require the use of id_token_hint in an OIDC RP-initiated logout sequence.
      Parameters:
      condition - condition to set
    • getLogoutHintMatchingStrategy

      @Nullable public BiPredicate<String,SPSession> getLogoutHintMatchingStrategy(@Nullable ProfileRequestContext profileRequestContext)
      Description copied from interface: OIDCLogoutProfileConfiguration
      Get the bi-predicate for matching logout hint to an existing session in an OIDC RP-initiated logout sequence.
      Specified by:
      getLogoutHintMatchingStrategy in interface OIDCLogoutProfileConfiguration
      Parameters:
      profileRequestContext - profile request context
      Returns:
      the bi-predicate for matching logout hint to an existing session.
    • setLogoutHintMatchingStrategy

      public void setLogoutHintMatchingStrategy(@Nonnull BiPredicate<String,SPSession> strategy)
      Set a bi-predicate for matching logout hint to an existing session in an OIDC RP-initiated logout sequence.
      Parameters:
      strategy - bi-predicate to set
    • setLogoutHintMatchingStrategyLookupStrategy

      public void setLogoutHintMatchingStrategyLookupStrategy(@Nonnull Function<ProfileRequestContext,BiPredicate<String,SPSession>> strategy)
      Set a lookup strategy for the bi-predicate for matching logout hint to an existing session in an OIDC RP-initiated logout sequence.
      Parameters:
      strategy - lookup strategy