public class AuthnError extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AuthnError.Builder
A fluent builder for
AuthnError instances. |
Constructor and Description |
---|
AuthnError()
Create 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.
|
Modifier and Type | Method and Description |
---|---|
String |
getCode()
Get the error code.
|
List<AuthnErrorDetail> |
getDetails()
Get the error details.
|
int |
getHttpStatus()
Get the HTTP status code.
|
String |
getMessage()
Get the developer-facing error message.
|
String |
getUserMessage()
Get the user-facing error message.
|
void |
setCode(String code)
Set the error code.
|
void |
setDetails(List<AuthnErrorDetail> details)
Set the error details.
|
void |
setHttpStatus(int httpStatus)
Set the HTTP status code.
|
void |
setMessage(String message)
Set the developer-facing error message.
|
void |
setUserMessage(String userMessage)
Directly set the localized user-facing error message.
|
void |
setUserMessageKey(String userMessageKey)
Set the user-facing error message key.
|
public AuthnError()
public AuthnError(int httpStatus, String code, String message)
httpStatus
- The HTTP status code.code
- The error code string.message
- The error message.public AuthnError(int httpStatus, String code, String message, List<AuthnErrorDetail> details)
httpStatus
- The HTTP status code.code
- The error code string.message
- The error message.details
- The details of the error.public int getHttpStatus()
public void setHttpStatus(int httpStatus)
public String getCode()
public void setCode(String code)
public String getMessage()
public void setMessage(String message)
public String getUserMessage()
setUserMessageKey()
or the localized error message can be directly set with setUserMessage()
.public void setUserMessageKey(String userMessageKey)
public void setUserMessage(String userMessage)
public List<AuthnErrorDetail> getDetails()
public void setDetails(List<AuthnErrorDetail> details)
Copyright 2019 Ping Identity Corp. All rights reserved.