Class InvalidRegistrationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.nimbusds.openid.connect.provider.spi.reg.InvalidRegistrationException
- All Implemented Interfaces:
Serializable
Invalid client registration exception.
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new invalid client registration exception with a generalinvalid_client_metadata
error code and description that doesn't specify the cause.InvalidRegistrationException
(@Nullable com.nimbusds.oauth2.sdk.ErrorObject errorObject) Creates a new invalid client registration exception with the specified error code and description.InvalidRegistrationException
(String field, @Nullable String cause) Creates a new invalid client registration exception, with the error code set toinvalid_client_metadata
and a description specifying the name of the invalid field and cause. -
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.oauth2.sdk.ErrorObject
Returns the associated error object.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidRegistrationException
public InvalidRegistrationException()Creates a new invalid client registration exception with a generalinvalid_client_metadata
error code and description that doesn't specify the cause.This will result in the following error response:
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error" : "invalid_client_metadata", "error_description" : "Invalid client metadata field" }
-
InvalidRegistrationException
Creates a new invalid client registration exception with the specified error code and description.The error code should be one of the following:
invalid_redirect_uri
invalid_client_metadata
invalid_software_statement
unapproved_software_statement
To construct an exception for a general
invalid_client_metadata
error with a description:new InvalidRegistrationException(RegistrationError.INVALID_CLIENT_METADATA .setDescription("The policy_uri must be on a redirect_uris domain"));
This will result in the following error response:
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error" : "invalid_client_metadata", "error_description" : "The policy_uri must be on a redirect_uris domain" }
- Parameters:
errorObject
- The associated error object. Ifnull
will be set toinvalid_client_metadata
.
-
InvalidRegistrationException
Creates a new invalid client registration exception, with the error code set toinvalid_client_metadata
and a description specifying the name of the invalid field and cause.Example:
new InvalidRegistrationException("policy_uri", "Must be on a redirect_uris domain");
This will result in the following error response:
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error" : "invalid_client_metadata", "error_description" : "Invalid client metadata field policy_uri: Must be on a redirect_uris domain" }
- Parameters:
field
- The name of the invalid client metadata field. Must not benull
.cause
- The cause,null
if not specified.
-
-
Method Details
-
getErrorObject
Returns the associated error object.- Returns:
- The associated error object.
-