java.lang.Object
com.irurueta.authserver.authorization.api.web.totp.TotpFactor

@Configuration(proxyBeanMethods=false) public class TotpFactor extends Object
Registers the time-based one-time password (and the recovery codes that stand in for it) as an authentication factor: a second one, which only counts once a primary factor has been presented.
  • Field Details

    • ID

      public static final String ID
      Identifier of the factor.
      See Also:
    • AMR_VALUE

      public static final String AMR_VALUE
      RFC 8176 amr value of a one-time password; recovery-code logins report it too.
      See Also:
    • AUTHORITY

      public static final String AUTHORITY
      Authority granted once a TOTP code or a recovery code has been verified. Spring Security has no constant for it, so it is a custom factor authority (FACTOR_ prefix included).
      See Also:
  • Constructor Details

    • TotpFactor

      public TotpFactor()
  • Method Details

    • totpAuthenticationFactor

      @Bean public AuthenticationFactor totpAuthenticationFactor()
      Declares the TOTP factor.
      Returns:
      the factor.