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
public abstract class ErrorResponse extends Response
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
Constructors Constructor Description ErrorResponse(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBody()Returns the body for the OAuth2 response.StringgetError()Returns the single ASCII error code.StringgetErrorDescription()Returns the optional human-readable ASCII text description of the error.
-
-
-
Constructor Detail
-
ErrorResponse
public ErrorResponse(org.springframework.http.HttpStatus status, String error)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 Detail
-
getBody
public String getBody()
Returns the body for the OAuth2 response.
-
getError
public String getError()
Returns the single ASCII error code.- Returns:
- the single ASCII error code
-
getErrorDescription
public String getErrorDescription()
Returns the optional human-readable ASCII text description of the error.- Returns:
- the optional human-readable ASCII text description of the error
-
-