Class SecondFactorOnlyCredentialPolicyRule

All Implemented Interfaces:
CredentialPolicy, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

public class SecondFactorOnlyCredentialPolicyRule extends AbstractCredentialPolicyRule
A CredentialPolicy that rejects credentials used in sole-factor mode if created by authenticators which should only be used for second factor authentication.
  • Field Details

    • log

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

      @Nonnull @NotLive @Unmodifiable private Set<com.yubico.fido.metadata.AAGUID> secondFactorOnlyAuthenticators
      A set of authenticators that should only be used for second factor authentication, based on their AAGUID.
  • Constructor Details

    • SecondFactorOnlyCredentialPolicyRule

      public SecondFactorOnlyCredentialPolicyRule()
      Constructor.
  • Method Details

    • setSecondFactorOnlyAuthenticators

      public void setSecondFactorOnlyAuthenticators(Set<String> allowed)
      Set the authenticators that should only be used for second factor authentication based on their AAGUID.
      Parameters:
      allowed - The second factor authenticators to set.
    • doEvaluate

      public CredentialPolicy.CredentialPolicyOutcome doEvaluate(@Nonnull EnhancedCredentialRecord credential, @Nonnull ProfileRequestContext prc, @Nonnull WebAuthnAuthenticationContext webAuthnContext)
      Execute the policy. Implementations should override this method.
      Specified by:
      doEvaluate in class AbstractCredentialPolicyRule
      Parameters:
      credential - the credential to check the policy rules for
      prc - the profile request context
      webAuthnContext - the WebAuthn authentication context
      Returns:
      the credential policy outcome