Class AbstractAuthenticationRequestParameterValueMessageHandler<T>

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.oidc.profile.messaging.handler.impl.AbstractAuthenticationRequestParameterValueMessageHandler<T>
Type Parameters:
T - the authentication request parameter value type
All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, MessageHandler
Direct Known Subclasses:
AddAuthenticationContextClassReferencesHandler, AddDisplayHandler, AddEndpointURIHandler, AddForceAuthenticationHandler, AddLoginHintHandler, AddMaxAgeHandler, AddNonceHandler, AddPKCECodeVerifierAndChallenge, AddPromptHandler, AddRedirectURIHandler, AddRequestedClaimsHandler, AddResourceHandler, AddResponseModeHandler, AddResponseTypeHandler, AddScopesHandler, AddStateHandler, AddUiLocalesHandler, BuildPlainRequestObjectJWT, SetAuthenticationRequestTimeHandler

public abstract class AbstractAuthenticationRequestParameterValueMessageHandler<T> extends AbstractMessageHandler
Base class for message handlers that process and apply values of OpenID Connect authentication request parameters.

This abstract class provides common functionality for locating:

  • the OIDCAuthenticationRequest associated with the current MessageContext,
  • the OIDCProviderMetadata describing the peer OpenID Provider,
  • and the parameter value to be extracted and validated against the expected Java type.
  • Field Details

  • Constructor Details

    • AbstractAuthenticationRequestParameterValueMessageHandler

      protected AbstractAuthenticationRequestParameterValueMessageHandler(@Nonnull Class<T> valueType)
      Constructor.
      Parameters:
      valueType - type of value returned by handler
  • Method Details

    • getAuthenticationRequest

      @NonnullBeforeExec protected OIDCAuthenticationRequest getAuthenticationRequest()
      Get the authentication request.
      Returns:
      the authentication request
    • setProviderMetadataLookupStrategy

      public void setProviderMetadataLookupStrategy(@Nonnull Function<MessageContext,OIDCProviderMetadataContext> strategy)
      Set the lookup strategy to locate the OpenID providers metadata.
      Parameters:
      strategy - the strategy.
    • getProviderMetadata

      @NonnullBeforeExec protected com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata getProviderMetadata()
      Returns the OpenID Provider metadata. Should never be null after after doPreExecute has been called.
      Returns:
      The provider metadata context.
    • setParameterValueLookupStrategy

      public void setParameterValueLookupStrategy(@Nonnull Function<MessageContext,T> strategy)
      Set the parameter value lookup strategy used to find the value to set onto the authentication request.
      Parameters:
      strategy - The parameter value lookup strategy to set.
    • getParameterValue

      @Nullable protected T getParameterValue(MessageContext context) throws MessageHandlerException
      Retrieves the parameter value or configuration options from the configured lookup strategy, verifying at runtime that the result matches the type expected by the subclass.
      Parameters:
      context - the message context to pass to the lookup function
      Returns:
      the parameter value
      Throws:
      MessageHandlerException - if the value is not the expected type
    • setAuthenticationRequestLookupStrategy

      public void setAuthenticationRequestLookupStrategy(@Nonnull Function<MessageContext,OIDCAuthenticationRequest> strategy)
      Set the strategy used to locate the OIDCAuthenticationRequest to use.
      Parameters:
      strategy - lookup strategy
    • doPreInvoke

      protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException
      Overrides:
      doPreInvoke in class AbstractMessageHandler
      Throws:
      MessageHandlerException