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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthnErrorDetail.BuilderA fluent builder forAuthnErrorDetailinstances.
-
Constructor Summary
Constructors Constructor Description AuthnErrorDetail()Create an instance.AuthnErrorDetail(String code, String message, String target)Create an instance with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCode()Get the error code.StringgetMessage()Get the developer-facing error message.StringgetTarget()If the error applies to a specific field in an incoming API request, this identifies the name of the JSON field.StringgetUserMessage()Get the user-facing error message.StringgetUserMessageKey()Get the user-facing error message key.voidsetCode(String code)Set the error code.voidsetMessage(String message)Set the error message.voidsetTarget(String target)Set the target JSON field for the error.voidsetUserMessage(String userMessage)Directly set the localized user-facing error message.voidsetUserMessageKey(String userMessageKey)Set the user-facing error message key.
-
-
-
Constructor Detail
-
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 Detail
-
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 withsetUserMessageKey()or the localized error message can be directly set withsetUserMessage().
-
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.
-
-