Class CompromisedPasswordConfiguration

java.lang.Object
com.irurueta.authserver.authorization.api.web.password.CompromisedPasswordConfiguration

@Configuration(proxyBeanMethods=false) public class CompromisedPasswordConfiguration extends Object
Registers the CompromisedPasswordCheck port. The check is enabled unless authserver.password.compromised-check.enabled is false, in which case no password is reported as compromised (for example in offline environments).
  • Field Details

    • ENABLED_PROPERTY

      public static final String ENABLED_PROPERTY
      Name of the property that switches the check on and off.
      See Also:
  • Constructor Details

    • CompromisedPasswordConfiguration

      public CompromisedPasswordConfiguration()
  • Method Details

    • haveIBeenPwnedCompromisedPasswordCheck

      @Bean @ConditionalOnProperty(name="authserver.password.compromised-check.enabled", havingValue="true", matchIfMissing=true) public CompromisedPasswordCheck haveIBeenPwnedCompromisedPasswordCheck()
      Creates the check backed by the Have I Been Pwned range API.
      Returns:
      the enabled check.
    • noOpCompromisedPasswordCheck

      @Bean @ConditionalOnProperty(name="authserver.password.compromised-check.enabled", havingValue="false") public CompromisedPasswordCheck noOpCompromisedPasswordCheck()
      Creates the no-op check used when the property disables the check.
      Returns:
      a check that never reports a password as compromised.