Class AuthnErrorSpec
java.lang.Object
com.pingidentity.sdk.api.authn.spec.AuthnErrorSpec
A class which acts as a template for
AuthnError instances.
This allows common definitions for authentication errors to be shared across plugins. Once created, objects of this class
are immutable. Objects of this class are not normally returned in API responses. Instead, you create an
AuthnError instance using the makeInstance()
or makeInstanceBuilder() methods.- Since:
- 9.3
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionAuthnErrorSpec(int httpStatus, String code, String message) Create a spec with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetCode()Get the error code.intGet the HTTP status for this error.Get the developer-facing error message.Get the user-facing error message key.Get an instance ofAuthnErrorbased on the parameters in this spec.Get anAuthnErrorbuilder initialized with the parameters from this spec.
-
Constructor Details
-
AuthnErrorSpec
Create a spec with the specified parameters.- Parameters:
httpStatus- The HTTP status code for the error.code- The error code.message- The error message.
-
-
Method Details
-
makeInstanceBuilder
Get anAuthnErrorbuilder initialized with the parameters from this spec. -
makeInstance
Get an instance ofAuthnErrorbased on the parameters in this spec. -
getHttpStatus
public int getHttpStatus()Get the HTTP status for this error. -
getCode
Get the error code. -
getMessage
Get the developer-facing error message. -
getUserMessageKey
Get the user-facing error message key. A message key should be provided for any error likely to be displayed to the end user, with a corresponding error message specified in authn-api-messages.properties.
-