Class AuthErrorResponseBuilder
- All Implemented Interfaces:
Builder<AuthErrorResponse>
Example to create an instance using the builder pattern
AuthErrorResponse authErrorResponse = AuthErrorResponse.builder()
.statusCode(1)
.message("{message}")
.plusErrors(errorsBuilder -> errorsBuilder)
.error("{error}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds AuthErrorResponse with checking for non-null required valuesbuilds AuthErrorResponse without checking for non-null required valuesError code as per the OAuth 2.0 specification.error_description
(String error_description) Plain text description of the first error.errors
(ErrorObject... errors) Authentication and authorization-related errors returned for a request.errors
(List<ErrorObject> errors) Authentication and authorization-related errors returned for a request.getError()
Error code as per the OAuth 2.0 specification.Plain text description of the first error.Authentication and authorization-related errors returned for a request.First error message in theerrors
array.HTTP status code corresponding to the error.First error message in theerrors
array.static AuthErrorResponseBuilder
of()
factory method for an instance of AuthErrorResponseBuilderstatic AuthErrorResponseBuilder
of
(AuthErrorResponse template) create builder for AuthErrorResponse instanceplusErrors
(ErrorObject... errors) Authentication and authorization-related errors returned for a request.plusErrors
(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.statusCode
(Integer statusCode) HTTP status code corresponding to the error.withErrors
(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
-
Constructor Details
-
AuthErrorResponseBuilder
public AuthErrorResponseBuilder()
-
-
Method Details
-
statusCode
HTTP status code corresponding to the error.
- Parameters:
statusCode
- value to be set- Returns:
- Builder
-
message
First error message in the
errors
array.- Parameters:
message
- value to be set- Returns:
- Builder
-
errors
Authentication and authorization-related errors returned for a request.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
errors
Authentication and authorization-related errors returned for a request.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
Authentication and authorization-related errors returned for a request.
- Parameters:
errors
- value to be set- Returns:
- Builder
-
plusErrors
public AuthErrorResponseBuilder plusErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
withErrors
public AuthErrorResponseBuilder withErrors(Function<ErrorObjectBuilder, Builder<? extends ErrorObject>> builder) Authentication and authorization-related errors returned for a request.
- Parameters:
builder
- function to build the errors value- Returns:
- Builder
-
error
Error code as per the OAuth 2.0 specification. For example:
"access_denied"
.- Parameters:
error
- value to be set- Returns:
- Builder
-
error_description
Plain text description of the first error.
- Parameters:
error_description
- value to be set- Returns:
- Builder
-
getStatusCode
HTTP status code corresponding to the error.
- Returns:
- statusCode
-
getMessage
First error message in the
errors
array.- Returns:
- message
-
getErrors
Authentication and authorization-related errors returned for a request.
- Returns:
- errors
-
getError
Error code as per the OAuth 2.0 specification. For example:
"access_denied"
.- Returns:
- error
-
getError_description
Plain text description of the first error.
- Returns:
- error_description
-
build
builds AuthErrorResponse with checking for non-null required values- Specified by:
build
in interfaceBuilder<AuthErrorResponse>
- Returns:
- AuthErrorResponse
-
buildUnchecked
builds AuthErrorResponse without checking for non-null required values- Returns:
- AuthErrorResponse
-
of
factory method for an instance of AuthErrorResponseBuilder- Returns:
- builder
-
of
create builder for AuthErrorResponse instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-