java.lang.Object
com.irurueta.authserver.authorization.application.mfa.MfaConfiguration

@Configuration(proxyBeanMethods=false) @EnableConfigurationProperties(MfaProperties.class) public class MfaConfiguration extends Object
Exposes the domain collaborators of the multi-factor use cases as beans, so no use case creates them and a deployment (or a test) can replace any of them, and binds the MfaProperties.
  • Constructor Details

    • MfaConfiguration

      public MfaConfiguration()
  • Method Details

    • secretGenerator

      @Bean public SecretGenerator secretGenerator()
      Builds the generator of TOTP shared secrets.
      Returns:
      the generator (160-bit secrets from a SecureRandom).
    • totpAlgorithm

      @Bean public TotpAlgorithm totpAlgorithm()
      Builds the TOTP algorithm (RFC 6238, HMAC-SHA1, 30 seconds, 6 digits).
      Returns:
      the algorithm.
    • mfaPolicy

      @Bean public MfaPolicy mfaPolicy()
      Builds the policy that decides which factors are enough and when a second factor is required.
      Returns:
      the policy.