Class JSONErrorResponse
java.lang.Object
net.shibboleth.oidc.profile.messaging.JSONErrorResponse
- All Implemented Interfaces:
ErrorResponse,Message,Response
Class for creating JSON Error response for requests expecting JSON response.
- Since:
- 2.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringcache control value.private ErrorObjectError object.private Stringpragma value. -
Constructor Summary
ConstructorsConstructorDescriptionJSONErrorResponse(ErrorObject errorObject) Constructor.JSONErrorResponse(ErrorObject errorObject, String cacheControlValue, String pragmaValue) Constructor. -
Method Summary
-
Field Details
-
error
Error object. -
cacheControl
cache control value. -
pragma
pragma value.
-
-
Constructor Details
-
JSONErrorResponse
Constructor.- Parameters:
errorObject- error. MUST not be null.
-
JSONErrorResponse
public JSONErrorResponse(@Nonnull 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 interfaceResponse
-
getContent
Error content as json.- Returns:
- error as json.
-
toHTTPResponse
- Specified by:
toHTTPResponsein interfaceResponse
-
getErrorObject
- Specified by:
getErrorObjectin interfaceErrorResponse
-