Package com.nimbusds.oauth2.sdk
Class PushedAuthorizationErrorResponse
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.PushedAuthorizationResponse
-
- com.nimbusds.oauth2.sdk.PushedAuthorizationErrorResponse
-
- All Implemented Interfaces:
ErrorResponse,Message,Response
@Immutable public class PushedAuthorizationErrorResponse extends PushedAuthorizationResponse implements ErrorResponse
Pushed authorisation error response.Example HTTP response:
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-cache, no-store { "error ": "invalid_request", "error_description" : "The redirect_uri is not valid for the given client" }Related specifications:
- OAuth 2.0 Pushed Authorization Requests (draft-lodderstedt-oauth-par-01)
-
-
Constructor Summary
Constructors Constructor Description PushedAuthorizationErrorResponse(ErrorObject error)Creates a new pushed authorisation error response.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorObjectgetErrorObject()Gets the error associated with the error response.booleanindicatesSuccess()Checks if the response indicates success.static PushedAuthorizationErrorResponseparse(HTTPResponse httpResponse)Parses a pushed authorisation error response from the specified HTTP response.HTTPResponsetoHTTPResponse()Returns the matching HTTP response.-
Methods inherited from class com.nimbusds.oauth2.sdk.PushedAuthorizationResponse
toErrorResponse, toSuccessResponse
-
-
-
-
Constructor Detail
-
PushedAuthorizationErrorResponse
public PushedAuthorizationErrorResponse(ErrorObject error)
Creates a new pushed authorisation error response.- Parameters:
error- The error. Must not benull.
-
-
Method Detail
-
indicatesSuccess
public boolean indicatesSuccess()
Description copied from interface:ResponseChecks if the response indicates success.- Specified by:
indicatesSuccessin interfaceResponse- Returns:
trueif the response indicates success, elsefalse.
-
getErrorObject
public ErrorObject getErrorObject()
Description copied from interface:ErrorResponseGets the error associated with the error response.- Specified by:
getErrorObjectin interfaceErrorResponse- Returns:
- The error,
nullif none.
-
toHTTPResponse
public HTTPResponse toHTTPResponse()
Description copied from interface:ResponseReturns the matching HTTP response.- Specified by:
toHTTPResponsein interfaceResponse- Returns:
- The HTTP response.
-
parse
public static PushedAuthorizationErrorResponse parse(HTTPResponse httpResponse) throws ParseException
Parses a pushed authorisation error response from the specified HTTP response.- Parameters:
httpResponse- The HTTP response. Must not benull.- Returns:
- The pushed authorisation error response.
- Throws:
ParseException- If the HTTP response couldn't be parsed to a pushed authorisation error response.
-
-