Class PasswordPolicyException

All Implemented Interfaces:
Serializable

public class PasswordPolicyException extends SecurityException

Thrown to indicate that a password does not comply with a password policy.

Since:
1.5
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • PasswordPolicyException

      public PasswordPolicyException(PasswordPolicy.PasswordStrength passwordStrength)

      Creates a password policy exception with the specified strength.

      Parameters:
      passwordStrength - the password strength of the non-compliant password
    • PasswordPolicyException

      public PasswordPolicyException(PasswordPolicy.PasswordStrength passwordStrength, String message)

      Creates a password exception with the specified password strength and message.

      Parameters:
      passwordStrength - the password strength of the non-compliant password
      message - the message
    • PasswordPolicyException

      public PasswordPolicyException(PasswordPolicy.PasswordStrength passwordStrength, Throwable cause)

      Creates a password exception with the specified password strength and cause.

      Parameters:
      passwordStrength - the password strength of the non-compliant password
      cause - the cause
    • PasswordPolicyException

      public PasswordPolicyException(PasswordPolicy.PasswordStrength passwordStrength, String message, Throwable cause)

      Creates a password exception with the specified password strength, message and cause.

      Parameters:
      passwordStrength - the password strength of the non-compliant password
      message - the message
      cause - the cause
    • PasswordPolicyException

      public PasswordPolicyException(PasswordPolicy.PasswordStrength passwordStrength, String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)

      Creates a password exception with the specified password strength, message, cause, suppression enabled or disabled and writable stack trace enabled or disabled.

      Parameters:
      passwordStrength - the password strength of the non-compliant password
      message - the message
      cause - the cause
      enableSuppression - true to enable suppression, false otherwise
      writableStackTrace - true to make the stack trace writable, false otherwise
  • Method Details

    • getPasswordStrength

      public PasswordPolicy.PasswordStrength getPasswordStrength()

      Returns the strength of the non-compliant password.

      Returns:
      the password strength