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
  • Field Details

  • Constructor Details

    • OAuth2ErrorResponse

      public OAuth2ErrorResponse()
  • Method Details

    • getErrorAsString

      public String getErrorAsString()
      The wire value of error: 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() reads UNKNOWN_DEFAULT_OPEN_API; writing this model sends that wire value back, never the sentinel.
      • For an absent member, null.
      Returns:
      the wire value, or null when the member is absent
    • error

      public OAuth2ErrorResponse error(@Nonnull OAuth2ErrorResponse.ErrorEnum error)
    • getError

      @Nonnull public OAuth2ErrorResponse.ErrorEnum 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

      public void setError(@Nonnull OAuth2ErrorResponse.ErrorEnum error)
    • errorDescription

      public OAuth2ErrorResponse errorDescription(@Nullable String errorDescription)
    • getErrorDescription

      @Nullable public String getErrorDescription()
      Human-readable ASCII text providing additional information about the error
      Returns:
      errorDescription
    • setErrorDescription

      public void setErrorDescription(@Nullable String errorDescription)
    • errorUri

      public OAuth2ErrorResponse errorUri(@Nullable String errorUri)
    • getErrorUri

      @Nullable public String getErrorUri()
      URI identifying a human-readable web page with information about the error
      Returns:
      errorUri
    • setErrorUri

      public void setErrorUri(@Nullable String errorUri)
    • authSession

      public OAuth2ErrorResponse authSession(@Nullable String authSession)
    • getAuthSession

      @Nullable public String 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

      public void setAuthSession(@Nullable String authSession)
    • type

      public OAuth2ErrorResponse type(@Nullable String type)
    • getType

      @Nullable public String getType()
      URI reference identifying the problem type (RFC 7807)
      Returns:
      type
    • setType

      public void setType(@Nullable String type)
    • title

      public OAuth2ErrorResponse title(@Nullable String title)
    • getTitle

      @Nullable public String getTitle()
      Short, human-readable summary of the problem type (RFC 7807)
      Returns:
      title
    • setTitle

      public void setTitle(@Nullable String title)
    • status

      public OAuth2ErrorResponse status(@Nullable Integer status)
    • getStatus

      @Nullable public Integer getStatus()
      HTTP status code (RFC 7807)
      Returns:
      status
    • setStatus

      public void setStatus(@Nullable Integer status)
    • detail

      public OAuth2ErrorResponse detail(@Nullable String detail)
    • getDetail

      @Nullable public String getDetail()
      Human-readable explanation specific to this occurrence (RFC 7807)
      Returns:
      detail
    • setDetail

      public void setDetail(@Nullable String detail)
    • instance

      public OAuth2ErrorResponse instance(@Nullable String instance)
    • getInstance

      @Nullable public String getInstance()
      URI reference identifying the specific occurrence of the problem (RFC 7807)
      Returns:
      instance
    • setInstance

      public void setInstance(@Nullable String instance)
    • timestamp

      public OAuth2ErrorResponse timestamp(@Nullable Long timestamp)
    • getTimestamp

      @Nullable public Long getTimestamp()
      Unix timestamp when the error occurred (RFC 7807 extension)
      Returns:
      timestamp
    • setTimestamp

      public void setTimestamp(@Nullable Long timestamp)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      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 of validateJsonElement(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

      public static OAuth2ErrorResponse fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of OAuth2ErrorResponse to an JSON string
      Returns:
      JSON string