Class JdbcUserMfaSettingsRepository

java.lang.Object
com.irurueta.authserver.authorization.infrastructure.persistence.mfa.JdbcUserMfaSettingsRepository
All Implemented Interfaces:
UserMfaSettingsRepository

@Repository public class JdbcUserMfaSettingsRepository extends Object implements UserMfaSettingsRepository
UserMfaSettingsRepository over the mfa_required column of the users table.
  • Field Details

    • jdbcClient

      private final org.springframework.jdbc.core.simple.JdbcClient jdbcClient
      JDBC client used to run the statements.
  • Constructor Details

    • JdbcUserMfaSettingsRepository

      public JdbcUserMfaSettingsRepository()
  • Method Details

    • isRequired

      public boolean isRequired(UUID userId)
      Description copied from interface: UserMfaSettingsRepository
      Tells whether an account requires a second factor.
      Specified by:
      isRequired in interface UserMfaSettingsRepository
      Parameters:
      userId - identifier of the user.
      Returns:
      true when the account requires it; false when it does not or does not exist.
    • setRequired

      public void setRequired(UUID userId, boolean required)
      Description copied from interface: UserMfaSettingsRepository
      Sets whether an account requires a second factor.
      Specified by:
      setRequired in interface UserMfaSettingsRepository
      Parameters:
      userId - identifier of the user.
      required - whether it is required.