Class TotpConfiguration

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

@Configuration(proxyBeanMethods=false) public class TotpConfiguration extends Object
Wires the TOTP second factor into the login/UI chain. The filters are built here and handed to the customizer, never declared as beans: Spring Boot would register every Filter bean in the servlet container, outside the security chain.
  • Constructor Details

    • TotpConfiguration

      public TotpConfiguration()
  • Method Details

    • totpChainCustomizer

      @Bean @Order(1) public LoginChainCustomizer totpChainCustomizer(TotpCodeVerifier totpCodeVerifier, CreateTrustedDeviceUseCase createTrustedDeviceUseCase, FindTrustedDeviceUseCase findTrustedDeviceUseCase, SecondFactorUserResolver userResolver, FactorGrantor factorGrantor, TrustedDeviceCookieWriter cookieWriter, PendingRecoveryCodes pendingRecoveryCodes)
      Installs the TOTP second factor in the login/UI chain.
      Parameters:
      totpCodeVerifier - verifies a posted code with the use case of its kind.
      createTrustedDeviceUseCase - remembers a device.
      findTrustedDeviceUseCase - finds a remembered device.
      userResolver - resolves the identifier of the account of the signed-in user.
      factorGrantor - adds the factor authority to an authentication.
      cookieWriter - writes the cookie of a remembered device.
      pendingRecoveryCodes - keeps the recovery codes of an enrolment until they are shown.
      Returns:
      the customizer.