Class AuthnErrorSpec
- java.lang.Object
-
- com.pingidentity.sdk.api.authn.spec.AuthnErrorSpec
-
public class AuthnErrorSpec extends Object
A class which acts as a template forAuthnErrorinstances. 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 anAuthnErrorinstance using themakeInstance()ormakeInstanceBuilder()methods.- Since:
- 9.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuthnErrorSpec.BuilderA fluent builder forAuthnErrorSpecspecs.
-
Constructor Summary
Constructors Constructor Description AuthnErrorSpec(int httpStatus, String code, String message)Create a spec with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCode()Get the error code.intgetHttpStatus()Get the HTTP status for this error.StringgetMessage()Get the developer-facing error message.StringgetUserMessageKey()Get the user-facing error message key.AuthnErrormakeInstance()Get an instance ofAuthnErrorbased on the parameters in this spec.AuthnError.BuildermakeInstanceBuilder()Get anAuthnErrorbuilder initialized with the parameters from this spec.
-
-
-
Method Detail
-
makeInstanceBuilder
public AuthnError.Builder makeInstanceBuilder()
Get anAuthnErrorbuilder initialized with the parameters from this spec.
-
makeInstance
public AuthnError makeInstance()
Get an instance ofAuthnErrorbased on the parameters in this spec.
-
getHttpStatus
public int getHttpStatus()
Get the HTTP status for this error.
-
getCode
public String getCode()
Get the error code.
-
getMessage
public String getMessage()
Get the developer-facing error message.
-
getUserMessageKey
public String 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.
-
-