Class ExtractClientAuthenticationFromRequest

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class ExtractClientAuthenticationFromRequest extends AbstractExtractionAction
Extracts OAuth 2 client authentication details from a request and stores them in an OAuth2ClientAuthenticationContext beneath the AuthenticationContext for subsequent validation.

Depending on the form of authentication, additional child contexts may be created to store extracted credentials, and they may undergo configured transformations. For example, password-based methods will result in a UsernamePasswordContext, certificate-based in an CertificateContext, etc.

Event:
EventIds.PROCEED_EVENT_ID, EventIds.INVALID_MSG_CTX, AuthnEventIds.NO_CREDENTIALS
Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class) != null
Postcondition:
AuthenticationContext.getSubcontext(OAuth2ClientAuthenticationContext.class) ! null along with other contexts as appropriate
  • Field Details

    • log

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

      @NonnullAfterInit private Function<ProfileRequestContext,Set<com.nimbusds.oauth2.sdk.auth.ClientAuthenticationMethod>> clientAuthMethodsLookupStrategy
      Lookup strategy for enabled client authentication methods.
    • request

      @Nullable private com.nimbusds.oauth2.sdk.AbstractOptionallyAuthenticatedRequest request
      Message to extract credentials from.
  • Constructor Details

    • ExtractClientAuthenticationFromRequest

      public ExtractClientAuthenticationFromRequest()
      Constructor.
  • Method Details