Class AuthnErrorDetail

java.lang.Object
com.pingidentity.sdk.api.authn.model.AuthnErrorDetail
Direct Known Subclasses:
PasswordPolicyViolationDetail

public class AuthnErrorDetail extends Object
The API model representing additional details for an error returned by the Authentication API.
Since:
9.3
  • Constructor Details

    • AuthnErrorDetail

      public AuthnErrorDetail()
      Create an instance.
    • AuthnErrorDetail

      public AuthnErrorDetail(String code, String message, String target)
      Create an instance with the specified parameters.
      Parameters:
      code - The error code.
      message - The error message.
      target - If the error applies to a specific field in an incoming API request, this contains the name of the JSON field.
  • Method Details

    • getCode

      public String getCode()
      Get the error code.
    • setCode

      public void setCode(String code)
      Set the error code.
    • getMessage

      public String getMessage()
      Get the developer-facing error message.
    • setMessage

      public void setMessage(String message)
      Set the error message.
    • getUserMessage

      public String getUserMessage()
      Get the user-facing error message. A user-facing error message should be provided for any error likely to be displayed to the end user. A localizable message key can be provided with setUserMessageKey() or the localized error message can be directly set with setUserMessage().
    • setUserMessageKey

      public void setUserMessageKey(String userMessageKey)
      Set the user-facing error message key. In the JSON serialization this key will automatically be converted to a localized string if a corresponding message is defined in the authn-api-messages or the pingfederate-messages properties file for the user's locale.
    • getUserMessageKey

      public String getUserMessageKey()
      Get the user-facing error message key.
    • setUserMessage

      public void setUserMessage(String userMessage)
      Directly set the localized user-facing error message.
    • getTarget

      public String getTarget()
      If the error applies to a specific field in an incoming API request, this identifies the name of the JSON field. If the field is nested within the incoming request, JSON pointer syntax is used to identify the field. The leading "/" is omitted when JSON pointer syntax is used.
    • setTarget

      public void setTarget(String target)
      Set the target JSON field for the error.