Interface AuthErrorResponse
- All Superinterfaces:
ErrorResponse
Represents errors related to authentication and authorization in a format conforming to the OAuth 2.0 specification.
Example to create an instance using the builder pattern
AuthErrorResponse authErrorResponse = AuthErrorResponse.builder()
.statusCode(1)
.message("{message}")
.plusErrors(errorsBuilder -> errorsBuilder)
.error("{error}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthErrorResponseBuilder
builder()
builder factory method for AuthErrorResponsestatic AuthErrorResponseBuilder
builder
(AuthErrorResponse template) create builder for AuthErrorResponse instancestatic AuthErrorResponse
deepCopy
(AuthErrorResponse template) factory method to create a deep copy of AuthErrorResponse@NotNull String
getError()
Error code as per the OAuth 2.0 specification.Plain text description of the first error.@NotNull @Valid List<ErrorObject>
Authentication and authorization-related errors returned for a request.static AuthErrorResponse
of()
factory methodstatic AuthErrorResponse
of
(AuthErrorResponse template) factory method to create a shallow copy AuthErrorResponsevoid
Error code as per the OAuth 2.0 specification.void
setErrorDescription
(String errorDescription) Plain text description of the first error.void
setErrors
(ErrorObject... errors) Authentication and authorization-related errors returned for a request.void
setErrors
(List<ErrorObject> errors) Authentication and authorization-related errors returned for a request.static com.fasterxml.jackson.core.type.TypeReference<AuthErrorResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAuthErrorResponse
(Function<AuthErrorResponse, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorResponse
getMessage, getStatusCode, setMessage, setStatusCode, withErrorResponse
-
Method Details
-
getError
Error code as per the OAuth 2.0 specification. For example:
"access_denied"
.- Returns:
- error
-
getErrorDescription
String getErrorDescription()Plain text description of the first error.
- Returns:
- error_description
-
getErrors
Authentication and authorization-related errors returned for a request.
- Specified by:
getErrors
in interfaceErrorResponse
- Returns:
- errors
-
setError
Error code as per the OAuth 2.0 specification. For example:
"access_denied"
.- Parameters:
error
- value to be set
-
setErrorDescription
Plain text description of the first error.
- Parameters:
errorDescription
- value to be set
-
setErrors
Authentication and authorization-related errors returned for a request.
- Specified by:
setErrors
in interfaceErrorResponse
- Parameters:
errors
- values to be set
-
setErrors
Authentication and authorization-related errors returned for a request.
- Specified by:
setErrors
in interfaceErrorResponse
- Parameters:
errors
- values to be set
-
of
factory method- Returns:
- instance of AuthErrorResponse
-
of
factory method to create a shallow copy AuthErrorResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of AuthErrorResponse- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AuthErrorResponse- Returns:
- builder
-
builder
create builder for AuthErrorResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAuthErrorResponse
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-