Class JSONErrorResponse
java.lang.Object
net.shibboleth.oidc.profile.messaging.JSONErrorResponse
- All Implemented Interfaces:
com.nimbusds.oauth2.sdk.ErrorResponse,com.nimbusds.oauth2.sdk.Message,com.nimbusds.oauth2.sdk.Response
Class for creating JSON Error response for requests expecting JSON response.
- Since:
- 2.2.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJSONErrorResponse(com.nimbusds.oauth2.sdk.ErrorObject errorObject) Constructor.JSONErrorResponse(com.nimbusds.oauth2.sdk.ErrorObject errorObject, String cacheControlValue, String pragmaValue) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate StringError content as json.com.nimbusds.oauth2.sdk.ErrorObjectbooleancom.nimbusds.oauth2.sdk.http.HTTPResponse
-
Field Details
-
error
private com.nimbusds.oauth2.sdk.ErrorObject errorError object. -
cacheControl
cache control value. -
pragma
pragma value.
-
-
Constructor Details
-
JSONErrorResponse
public JSONErrorResponse(@Nonnull com.nimbusds.oauth2.sdk.ErrorObject errorObject) Constructor.- Parameters:
errorObject- error. MUST not be null.
-
JSONErrorResponse
public JSONErrorResponse(@Nonnull com.nimbusds.oauth2.sdk.ErrorObject errorObject, @Nullable String cacheControlValue, @Nullable String pragmaValue) Constructor.- Parameters:
errorObject- JSON content.cacheControlValue- cache control value.pragmaValue- pragma value.
-
-
Method Details
-
indicatesSuccess
public boolean indicatesSuccess()- Specified by:
indicatesSuccessin interfacecom.nimbusds.oauth2.sdk.Response
-
getContent
Error content as json.- Returns:
- error as json.
-
toHTTPResponse
public com.nimbusds.oauth2.sdk.http.HTTPResponse toHTTPResponse()- Specified by:
toHTTPResponsein interfacecom.nimbusds.oauth2.sdk.Response
-
getErrorObject
public com.nimbusds.oauth2.sdk.ErrorObject getErrorObject()- Specified by:
getErrorObjectin interfacecom.nimbusds.oauth2.sdk.ErrorResponse
-