Class AuthnError.Builder
- java.lang.Object
-
- com.pingidentity.sdk.api.authn.model.AuthnError.Builder
-
- Enclosing class:
- AuthnError
public static class AuthnError.Builder extends Object
A fluent builder forAuthnErrorinstances.- Since:
- 9.3
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthnErrorbuild()Create the authn error.AuthnError.Buildercode(String code)Set the error code.AuthnError.Builderdetail(AuthnErrorDetail detail)Add an additional error detail object.AuthnError.BuilderhttpStatus(int httpStatus)Set the status code.AuthnError.Buildermessage(String message)Set the developer-facing error message.AuthnError.BuilderuserMessage(String userMessage)Directly set the localized user-facing error message.AuthnError.BuilderuserMessageKey(String messageKey)Set the user-facing error message key.
-
-
-
Method Detail
-
build
public AuthnError build()
Create the authn error.
-
httpStatus
public AuthnError.Builder httpStatus(int httpStatus)
Set the status code.
-
code
public AuthnError.Builder code(String code)
Set the error code.
-
message
public AuthnError.Builder message(String message)
Set the developer-facing error message.
-
userMessageKey
public AuthnError.Builder userMessageKey(String messageKey)
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.
-
userMessage
public AuthnError.Builder userMessage(String userMessage)
Directly set the localized user-facing error message.
-
detail
public AuthnError.Builder detail(AuthnErrorDetail detail)
Add an additional error detail object.
-
-