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 AuthErrorResponseBuilderbuilder()builder factory method for AuthErrorResponsestatic AuthErrorResponseBuilderbuilder(AuthErrorResponse template) create builder for AuthErrorResponse instancecopyDeep()static AuthErrorResponsedeepCopy(AuthErrorResponse template) factory method to create a deep copy of AuthErrorResponse@NotNull StringgetError()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 AuthErrorResponseof()factory methodstatic AuthErrorResponseof(AuthErrorResponse template) factory method to create a shallow copy AuthErrorResponsevoidError code as per the OAuth 2.0 specification.voidsetErrorDescription(String errorDescription) Plain text description of the first error.voidsetErrors(ErrorObject... errors) Authentication and authorization-related errors returned for a request.voidsetErrors(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> TwithAuthErrorResponse(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:
getErrorsin 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:
setErrorsin interfaceErrorResponse- Parameters:
errors- values to be set
-
setErrors
Authentication and authorization-related errors returned for a request.
- Specified by:
setErrorsin 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
-
copyDeep
AuthErrorResponse copyDeep()- Specified by:
copyDeepin interfaceErrorResponse
-
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
-