Class AbstractOAuth2InterceptorAwareProfileConfiguration

All Implemented Interfaces:
InterceptorAwareProfileConfiguration, OAuth2InterceptorAwareProfileConfiguration, OAuth2ProfileConfiguration, ConditionalProfileConfiguration, ProfileConfiguration, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent
Direct Known Subclasses:
AbstractOAuth2ClientAuthenticableProfileConfiguration, DefaultOAuth2TokenAudienceConfiguration, DefaultOIDCLogoutConfiguration

public abstract class AbstractOAuth2InterceptorAwareProfileConfiguration extends AbstractInterceptorAwareProfileConfiguration implements OAuth2InterceptorAwareProfileConfiguration
Abstract profile configuration implementation for interceptor flow aware OAuth2 profile configurations.
Since:
3.2.0
  • Field Details

  • Constructor Details

    • AbstractOAuth2InterceptorAwareProfileConfiguration

      public AbstractOAuth2InterceptorAwareProfileConfiguration(@Nonnull @NotEmpty String profileId)
      Constructor.
      Parameters:
      profileId - Unique profile identifier.
  • Method Details

    • getMessageHandler

      @Nullable public Function<MessageContext,Exception> getMessageHandler(@Nullable MessageContext messageContext)
      Get a custom handler for a message produced or consumed by this profile.

      This function MUST be stateless and reusable if statically configured, or may be stateful if obtained by means of a more dynamic strategy.

      The use of the Function API rather than the OpenSAML MessageHandler API is a concession to making scripted or otherwise non-Java implementations easily usable, and avoiding the explicit need to raise exceptions to signal errors, in cases where doing do is awkward.

      Specified by:
      getMessageHandler in interface OAuth2InterceptorAwareProfileConfiguration
      Parameters:
      messageContext - message context
      Returns:
      message handler
    • setMessageHandler

      public void setMessageHandler(@Nullable Function<MessageContext,Exception> handler)
      Set a handler for the message.
      Parameters:
      handler - message handler
      Since:
      3.2.0
    • setMessageHandlerLookupStrategy

      public void setMessageHandlerLookupStrategy(@Nonnull Function<MessageContext,Function<MessageContext,Exception>> strategy)
      Set a lookup strategy for the handler for the message.
      Parameters:
      strategy - lookup strategy
      Since:
      3.2.0