Package com.pingidentity.sdk.password
Class PasswordCredentialValidatorAuthnException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.pingidentity.sdk.password.PasswordValidationException
-
- com.pingidentity.sdk.password.PasswordCredentialValidatorAuthnException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PasswordCredentialChallengeException,PasswordPolicyRequirementValidationException
public class PasswordCredentialValidatorAuthnException extends PasswordValidationException
Runtime exception thrown when user authentication fails due to a problem related to invalid credentials or a condition on the server such as the account being locked. The message should be a key that exists in a file in the <pf-root>/server/default/conf/language-packs/pingfederate-messages.properties to support localization and internationalization.- Since:
- 6.11
- See Also:
PasswordCredentialValidator, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PasswordCredentialValidatorAuthnException(boolean isRecoverable, String messageKey)Create an instance for a user authentication error.PasswordCredentialValidatorAuthnException(boolean isRecoverable, String messageKey, String errorSource, String auditErrorMessage)Create an instance for a user authentication error.PasswordCredentialValidatorAuthnException(boolean isRecoverable, String messageKey, Throwable cause)Create an instance for a user authentication error.PasswordCredentialValidatorAuthnException(boolean isRecoverable, String messageKey, Throwable cause, String errorSource, String auditErrorMessage)Create an instance for a user authentication error.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuditErrorMessage()The error message for the audit log entryStringgetErrorSource()Accessor for the source of the error.StringgetMessage()Accessor for the exception message.StringgetMessageKey()Accessor for the messageKey property.booleanisRecoverable()Accessor for the isRecoverable property.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
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 anyerrorSource- 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:
getMessagein classThrowable- 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
-
-