Class AuthnError
java.lang.Object
com.pingidentity.sdk.api.authn.model.AuthnError
- All Implemented Interfaces:
WithStateAttributeSupport
The authentication API model representing an error of some kind.
- Since:
- 9.3
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance.AuthnError(int httpStatus, String code, String message) Create an instance with the specified parameters.AuthnError(int httpStatus, String code, String message, List<AuthnErrorDetail> details) Create an instance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Get the error code.Get the error details.intGet the HTTP status code.Get the developer-facing error message.getState()Get the cookieless state value.Get the user-facing error message.Get the user-facing error message key.voidSet the error code.voidsetDetails(List<AuthnErrorDetail> details) Set the error details.voidsetHttpStatus(int httpStatus) Set the HTTP status code.voidsetMessage(String message) Set the developer-facing error message.voidSet the cookieless state value.voidsetUserMessage(String userMessage) Directly set the localized user-facing error message.voidsetUserMessageKey(String userMessageKey) Set the user-facing error message key.
-
Constructor Details
-
AuthnError
public AuthnError()Create a new instance. -
AuthnError
Create an instance with the specified parameters.- Parameters:
httpStatus- The HTTP status code.code- The error code string.message- The error message.
-
AuthnError
Create an instance with the specified parameters.- Parameters:
httpStatus- The HTTP status code.code- The error code string.message- The error message.details- The details of the error.
-
-
Method Details
-
getHttpStatus
public int getHttpStatus()Get the HTTP status code. -
setHttpStatus
public void setHttpStatus(int httpStatus) Set the HTTP status code. -
getCode
Get the error code. -
setCode
Set the error code. -
getMessage
Get the developer-facing error message. -
setMessage
Set the developer-facing error message. -
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
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 properties file for the user's locale. -
getUserMessageKey
Get the user-facing error message key. -
setUserMessage
Directly set the localized user-facing error message. -
getDetails
Get the error details. -
setDetails
Set the error details. -
getState
Get the cookieless state value.- Specified by:
getStatein interfaceWithStateAttributeSupport- Returns:
- the cookieless state value or null
- Since:
- 12.1
-
setState
Set the cookieless state value.- Specified by:
setStatein interfaceWithStateAttributeSupport- Parameters:
state- the cookieless state value- Since:
- 12.1
-