Class PasswordConfiguration

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

@Configuration(proxyBeanMethods=false) public class PasswordConfiguration extends Object
Registers the password encoder of the password-based sign-in and of the client secrets: new values are encoded with Argon2, while bcrypt and PBKDF2 hashes stay verifiable (and are upgraded on the next successful sign-in).
  • Field Details

    • DEFAULT_ENCODING_ID

      public static final String DEFAULT_ENCODING_ID
      Identifier (stored as {id} prefix) of the algorithm used to encode new passwords.
      See Also:
    • BCRYPT_ENCODING_ID

      public static final String BCRYPT_ENCODING_ID
      Identifier of the legacy bcrypt encoding.
      See Also:
    • PBKDF2_ENCODING_ID

      public static final String PBKDF2_ENCODING_ID
      Identifier of the legacy PBKDF2 encoding.
      See Also:
  • Constructor Details

    • PasswordConfiguration

      public PasswordConfiguration()
  • Method Details

    • passwordEncoder

      @Bean public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()
      Creates the password encoder: a delegating encoder whose default is Argon2, with bcrypt and PBKDF2 kept for legacy hashes.
      Returns:
      the delegating password encoder.