Class PasswordCredentialValidatorAuthnException

    • Constructor Detail

      • PasswordCredentialValidatorAuthnException

        public PasswordCredentialValidatorAuthnException​(boolean isRecoverable,
                                                         String messageKey)
        Create an instance for a user authentication error.
        Parameters:
        isRecoverable - Whether the exception represents a condition that can be corrected by the user (e.g. must change password)
        messageKey - The key for the localized message displayed to the user. Failing to find it shows the message "as is".
      • PasswordCredentialValidatorAuthnException

        public PasswordCredentialValidatorAuthnException​(boolean isRecoverable,
                                                         String messageKey,
                                                         Throwable cause)
        Create an instance for a user authentication error.
        Parameters:
        isRecoverable - Whether the exception represents a condition that can be corrected by the user (e.g. must change password)
        messageKey - The key for the localized message displayed to the user. Failing to find it shows the message "as is".
        cause - The cause of the exception, if any
      • PasswordCredentialValidatorAuthnException

        public PasswordCredentialValidatorAuthnException​(boolean isRecoverable,
                                                         String messageKey,
                                                         String errorSource,
                                                         String auditErrorMessage)
        Create an instance for a user authentication error.
        Parameters:
        isRecoverable - Whether the exception represents a condition that can be corrected by the user (e.g. must change password)
        messageKey - The key for the localized message displayed to the user. Failing to find it shows the message "as is".
        errorSource - The source of the error (for example, the data store ID). If non-null, certain adapters, including the HTML Form Adapter, will ensure this is included in the audit log entry for the authentication attempt.
        auditErrorMessage - A short error message, suitable for inclusion in the audit log. If non-null, certain adapters, including the HTML Form Adapter, will ensure this is included in the audit log entry for the authentication attempt.
        Since:
        11.3
      • PasswordCredentialValidatorAuthnException

        public PasswordCredentialValidatorAuthnException​(boolean isRecoverable,
                                                         String messageKey,
                                                         Throwable cause,
                                                         String errorSource,
                                                         String auditErrorMessage)
        Create an instance for a user authentication error.
        Parameters:
        isRecoverable - Whether the exception represents a condition that can be corrected by the user (e.g. must change password)
        messageKey - The key for the localized message displayed to the user. Failing to find it shows the message "as is".
        cause - The cause of the exception, if any
        errorSource - The source of the error (for example, the data store ID). If non-null, certain adapters, including the HTML Form Adapter, will ensure this is included in the audit log entry for the authentication attempt.
        auditErrorMessage - A short error message, suitable for inclusion in the audit log. If non-null, certain adapters, including the HTML Form Adapter, will ensure this is included in the audit log entry for the authentication attempt.
        Since:
        11.3
    • Method Detail

      • isRecoverable

        public boolean isRecoverable()
        Accessor for the isRecoverable property.
        Returns:
        true if the user can fix the error themselves
      • getMessageKey

        public String getMessageKey()
        Accessor for the messageKey property.
        Returns:
        The key for the localized message displayed to the user. Failing to find it shows the message "as is".
      • getMessage

        public String getMessage()
        Accessor for the exception message.
        Overrides:
        getMessage in class Throwable
        Returns:
        the exception message if exists; otherwise return the error message key
      • getErrorSource

        public String getErrorSource()
        Accessor for the source of the error.
        Returns:
        the source of the error
        Since:
        11.3
      • getAuditErrorMessage

        public String getAuditErrorMessage()
        The error message for the audit log entry
        Returns:
        the error message for the audit log entry
        Since:
        11.3