Class OAuth2ErrorResponse
java.lang.Object
co.ankatech.keymanagement.client.auth.model.OAuth2ErrorResponse
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
comments="Generator version: 7.23.0")
public class OAuth2ErrorResponse
extends Object
OAuth 2.0 error response per RFC 6749 Section 5.2 with additional RFC 7807 fields
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumOAuth 2.0 error code per RFC 6749 Section 5.2. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthSession(String authSession) booleanerrorDescription(String errorDescription) static OAuth2ErrorResponseCreate an instance of OAuth2ErrorResponse given an JSON stringPresent only with `insufficient_authorization`: the step-up a tenant switch requires (draft-ietf-oauth-first-party-apps, section 5.2.2.1).Human-readable explanation specific to this occurrence (RFC 7807)getError()OAuth 2.0 error code per RFC 6749 Section 5.2.The wire value oferror: what the server sent, verbatim.Human-readable ASCII text providing additional information about the errorURI identifying a human-readable web page with information about the errorURI reference identifying the specific occurrence of the problem (RFC 7807)HTTP status code (RFC 7807)Unix timestamp when the error occurred (RFC 7807 extension)getTitle()Short, human-readable summary of the problem type (RFC 7807)getType()URI reference identifying the problem type (RFC 7807)inthashCode()voidsetAuthSession(String authSession) voidvoidvoidsetErrorDescription(String errorDescription) voidsetErrorUri(String errorUri) voidsetInstance(String instance) voidvoidsetTimestamp(Long timestamp) voidvoidtoJson()Convert an instance of OAuth2ErrorResponse to an JSON stringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues foundstatic voidvalidateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare.
-
Field Details
-
SERIALIZED_NAME_ERROR
- See Also:
-
SERIALIZED_NAME_ERROR_DESCRIPTION
- See Also:
-
SERIALIZED_NAME_ERROR_URI
- See Also:
-
SERIALIZED_NAME_AUTH_SESSION
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_TITLE
- See Also:
-
SERIALIZED_NAME_STATUS
- See Also:
-
SERIALIZED_NAME_DETAIL
- See Also:
-
SERIALIZED_NAME_INSTANCE
- See Also:
-
SERIALIZED_NAME_TIMESTAMP
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
OAuth2ErrorResponse
public OAuth2ErrorResponse()
-
-
Method Details
-
getErrorAsString
The wire value oferror: what the server sent, verbatim.- For a value this release declares, the same wire value the enum names.
- For a value it does not declare (one a later server added), the server's wire value verbatim,
while
getError()readsUNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel. - For an absent member,
null.
- Returns:
- the wire value, or
nullwhen the member is absent
-
error
-
getError
OAuth 2.0 error code per RFC 6749 Section 5.2. Standard values: - invalid_request: Missing or malformed parameter - invalid_client: Client authentication failed - invalid_grant: Invalid credentials or expired refresh token - unsupported_grant_type: Grant type not recognized - invalid_scope: Requested scope invalid or exceeds granted - insufficient_authorization: A tenant switch needs further authentication (HTTP 403); the answer carries an auth_session to continue with at the authorization challenge endpoint- Returns:
- error
-
setError
-
errorDescription
-
getErrorDescription
Human-readable ASCII text providing additional information about the error- Returns:
- errorDescription
-
setErrorDescription
-
errorUri
-
getErrorUri
URI identifying a human-readable web page with information about the error- Returns:
- errorUri
-
setErrorUri
-
authSession
-
getAuthSession
Present only with `insufficient_authorization`: the step-up a tenant switch requires (draft-ietf-oauth-first-party-apps, section 5.2.2.1). It is bound to the session that presented the refresh token and to the requested tenant. The client continues at `POST /api/v3/auth/authorize-challenge` with this `auth_session`, a new S256 `code_challenge` and no `action`, answers the step-up there, and redeems the authorization code it ends in on the `authorization_code` grant with the session's refresh token: the same session then continues in the requested tenant. Single use, valid for at most 10 minutes; nothing was issued or rotated, and the presented refresh token stays usable for its own tenant.- Returns:
- authSession
-
setAuthSession
-
type
-
getType
URI reference identifying the problem type (RFC 7807)- Returns:
- type
-
setType
-
title
-
getTitle
Short, human-readable summary of the problem type (RFC 7807)- Returns:
- title
-
setTitle
-
status
-
getStatus
HTTP status code (RFC 7807)- Returns:
- status
-
setStatus
-
detail
-
getDetail
Human-readable explanation specific to this occurrence (RFC 7807)- Returns:
- detail
-
setDetail
-
instance
-
getInstance
URI reference identifying the specific occurrence of the problem (RFC 7807)- Returns:
- instance
-
setInstance
-
timestamp
-
getTimestamp
Unix timestamp when the error occurred (RFC 7807 extension)- Returns:
- timestamp
-
setTimestamp
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to OAuth2ErrorResponse
-
validateJsonElementAsCandidate
public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException Validates the JSON Element as a candidate of a oneOf schema: the checks ofvalidateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is not a OAuth2ErrorResponse
-
fromJson
Create an instance of OAuth2ErrorResponse given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OAuth2ErrorResponse
- Throws:
IOException- if the JSON string is invalid with respect to OAuth2ErrorResponse
-
toJson
Convert an instance of OAuth2ErrorResponse to an JSON string- Returns:
- JSON string
-