Class ErrorResponse
java.lang.Object
africa.absa.inception.oauth2.server.authorization.controller.Response
africa.absa.inception.oauth2.server.authorization.controller.ErrorResponse
- Direct Known Subclasses:
InvalidClientErrorResponse,InvalidGrantErrorResponse,InvalidRequestErrorResponse,InvalidScopeErrorResponse,UnauthorizedClientErrorResponse,UnsupportedGrantTypeErrorResponse
The ErrorGrantResponse class holds the information for an OAuth2 error response and
provides the base class that all OAuth2 error response classes should be derived from.
See: Error Response
- Author:
- Marcus Portmann
-
Constructor Summary
ConstructorsConstructorDescriptionErrorResponse(org.springframework.http.HttpStatus status, String error) Constructs a new ErrorGrantResponse.ErrorResponse(org.springframework.http.HttpStatus status, String error, String errorDescription) Constructs a new ErrorResponse. -
Method Summary
-
Constructor Details
-
ErrorResponse
Constructs a new ErrorGrantResponse.- Parameters:
status- the HTTP status that should be returned for the OAuth2 error responseerror- the single ASCII error code
-
ErrorResponse
public ErrorResponse(org.springframework.http.HttpStatus status, String error, String errorDescription) Constructs a new ErrorResponse.- Parameters:
status- the HTTP status that should be returned for the OAuth2 error responseerror- the single ASCII error codeerrorDescription- the optional human-readable ASCII text description of the error
-
-
Method Details
-
getBody
Returns the body for the OAuth2 response. -
getError
Returns the single ASCII error code.- Returns:
- the single ASCII error code
-
getErrorDescription
Returns the optional human-readable ASCII text description of the error.- Returns:
- the optional human-readable ASCII text description of the error
-