Class ExtractPublicKeyCredentialAttestationFromFormRequest

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

public class ExtractPublicKeyCredentialAttestationFromFormRequest extends AbstractWebAuthnAction<WebAuthnRegistrationContext>
An action that extracts the PublicKeyCredential containing the authenticator attestation response from the incoming HTTP request. Also extracts the user entered credential nickname. Failure to find the attestation results in an a non-proceed event. Similarly, if a nickname is required and not provided a non-proceed event is signalled.
Event:
{WebAuthnRegistrationEventIds#INVALID_REGISTRATION}, {AuthnEventIds#NO_CREDENTIALS}
Precondition:
ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null
Postcondition:
add an AuthenticatorAttestationResponse and credential nickname (if present) to the registration context
  • Field Details

    • DEFAULT_PARAMETER_NAME

      @Nonnull @NotEmpty public static final String DEFAULT_PARAMETER_NAME
      Default public key credential attestation parameter name.
      See Also:
    • DEFAULT_NICKNAME_FIELD_NAME

      @Nonnull @NotEmpty public static final String DEFAULT_NICKNAME_FIELD_NAME
      Default nickname parameter name.
      See Also:
    • log

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

      @Nonnull @NotEmpty private String publicKeyCredentialAttestationParameterName
      Name of the public key credential attestation parameter.
    • credentialNicknameParameterName

      @Nonnull @NotEmpty private String credentialNicknameParameterName
      Name of the nickname parameter.
  • Constructor Details

    • ExtractPublicKeyCredentialAttestationFromFormRequest

      public ExtractPublicKeyCredentialAttestationFromFormRequest()
      Constructor.
  • Method Details

    • setPublickKeyCredentialAttestationParameterName

      public void setPublickKeyCredentialAttestationParameterName(@Nonnull @NotEmpty String field)
      Set the name of the parameter to extract the public key credential attestation response from.
      Parameters:
      field - the field name
    • setCredentialNicknameParameterName

      public void setCredentialNicknameParameterName(@Nonnull @NotEmpty String field)
      Set the name of the parameter to extract the credential nickname from.
      Parameters:
      field - field name
    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull WebAuthnRegistrationContext context)
      Description copied from class: AbstractWebAuthnAction
      Performs this WebAuthn authentication action using the supplied WebAuthn context. Implementations should override this method.
      Overrides:
      doExecute in class AbstractWebAuthnAction<WebAuthnRegistrationContext>
      Parameters:
      profileRequestContext - the current IdP profile request context
      context - the WebAuthn context