Class CheckUserHandleExistsIfNoAllowCredentials

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

public class CheckUserHandleExistsIfNoAllowCredentials extends AbstractWebAuthnAction<WebAuthnAuthenticationContext>
An action which checks if the userHandle is returned in the assertion response if the set of allowedCredentials in the request was empty. If they are empty, the userHandle must be returned, if they are not empty the userHandle may be returned in the response.

This generally protects against bad behaviour from authenticators for the rest of the flow.

Since:
1.1.0
Event:
{EventIds#INVALID_PROFILE_CTX}, {AuthnEventIds#INVALID_CREDENTIALS}
Precondition:
ProfileRequestContext.getSubcontext(WebAuthnRegistrationContext.class) != null
Postcondition:
a non-proceed event occurs if the userHandle was not present when the set of allowed credentials is empty.
  • Field Details

    • log

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

      private com.yubico.webauthn.data.PublicKeyCredential<com.yubico.webauthn.data.AuthenticatorAssertionResponse,com.yubico.webauthn.data.ClientAssertionExtensionOutputs> assertion
      The stashed assertion from the context.
    • requestOptions

      private com.yubico.webauthn.data.PublicKeyCredentialRequestOptions requestOptions
      The stashed request options from the context.
  • Constructor Details

    • CheckUserHandleExistsIfNoAllowCredentials

      protected CheckUserHandleExistsIfNoAllowCredentials()
      Constructor.
  • Method Details