Class AuthorizationChallengeResponse

java.lang.Object
co.ankatech.keymanagement.client.auth.model.AuthorizationChallengeResponse

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class AuthorizationChallengeResponse extends Object
An answer of the authorization challenge endpoint: the authorization code (200), the next step of the sign-in (403 insufficient_authorization), or the move of the sign-in to the browser for a federated path (403 redirect_to_web). Members that do not belong to the answer's kind are absent.
  • Field Details

  • Constructor Details

    • AuthorizationChallengeResponse

      public AuthorizationChallengeResponse()
  • 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
    • getNextAsString

      public String getNextAsString()
      The wire value of next: 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 getNext() 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
    • authorizationCode

      public AuthorizationChallengeResponse authorizationCode(@Nullable String authorizationCode)
    • getAuthorizationCode

      @Nullable public String getAuthorizationCode()
      200 only. The authorization code: redeem it once, within 60 seconds, at POST /api/v3/auth/token with grant_type=authorization_code and the code_verifier.
      Returns:
      authorizationCode
    • setAuthorizationCode

      public void setAuthorizationCode(@Nullable String authorizationCode)
    • error

    • getError

      @Nullable public AuthorizationChallengeResponse.ErrorEnum getError()
      403 only. insufficient_authorization: the sign-in continues with another step. redirect_to_web: the sign-in continues in the browser, through the identity provider of the federated path taken; navigate the browser (top level) to GET /api/v3/auth/idp/initiate?request_uri=<request_uri> before expires_in elapses. The auth_session presented is spent.
      Returns:
      error
    • setError

      public void setError(@Nullable AuthorizationChallengeResponse.ErrorEnum error)
    • authSession

      public AuthorizationChallengeResponse authSession(@Nullable String authSession)
    • getAuthSession

      @Nullable public String getAuthSession()
      403 insufficient_authorization only. The value the next request presents as auth_session. The value the request presented is no longer accepted.
      Returns:
      authSession
    • setAuthSession

      public void setAuthSession(@Nullable String authSession)
    • next

    • getNext

      @Nullable public AuthorizationChallengeResponse.NextEnum getNext()
      403 only. The step expected next: - credential: the first credential (the same answer for every caller) - tenant-selection: choose one of `tenants` with select-tenant - second-factor: one more proof, among `methods` - enrolment-required: an authenticator meeting `paths` must be enrolled first - setup: the initial setup of an identity whose credential another person set - recovery: a recovery code was accepted; only the enrolment of a new authenticator is admitted
      Returns:
      next
    • setNext

      public void setNext(@Nullable AuthorizationChallengeResponse.NextEnum next)
    • methods

      public AuthorizationChallengeResponse methods(@Nullable List<String> methods)
    • addMethodsItem

      public AuthorizationChallengeResponse addMethodsItem(String methodsItem)
    • getMethods

      @Nullable public List<String> getMethods()
      403 only. The actions that take the next step: passkey (passkey-assertion with `public_key`), password, ldap-password, recovery-code, totp, select-tenant, passkey-registration (taken with passkey-registration-options, then passkey-registration), totp-enrolment (taken with totp-enrolment, then totp-enrolment-verification), totp-enrolment-verification, password-set, federated (with the idp_id of one federated path).
      Returns:
      methods
    • setMethods

      public void setMethods(@Nullable List<String> methods)
    • publicKey

      public AuthorizationChallengeResponse publicKey(@Nullable PublicKeyRequestOptions publicKey)
    • getPublicKey

      @Nullable public PublicKeyRequestOptions getPublicKey()
      The WebAuthn PublicKeyCredentialRequestOptionsJSON of a passkey assertion, present when passkey is one of `methods`. Its challenge is bound to `auth_session`.
      Returns:
      publicKey
    • setPublicKey

      public void setPublicKey(@Nullable PublicKeyRequestOptions publicKey)
    • tenants

    • addTenantsItem

    • getTenants

      @Nullable public List<AuthorizationChallengeTenantOption> getTenants()
      next=tenant-selection only: the tenants the person may enter. Listed only after a proof that satisfies at least one of them.
      Returns:
      tenants
    • setTenants

      public void setTenants(@Nullable List<AuthorizationChallengeTenantOption> tenants)
    • paths

    • addPathsItem

    • getPaths

      @Nullable public List<AuthorizationChallengePath> getPaths()
      next=second-factor, enrolment-required or setup: the alternatives that would admit, each with the capability properties its authenticator must hold; a federated path names its identity provider.
      Returns:
      paths
    • setPaths

      public void setPaths(@Nullable List<AuthorizationChallengePath> paths)
    • publicKeyCreation

      public AuthorizationChallengeResponse publicKeyCreation(@Nullable PublicKeyCreationOptions publicKeyCreation)
    • getPublicKeyCreation

      @Nullable public PublicKeyCreationOptions getPublicKeyCreation()
      After passkey-registration-options: the WebAuthn PublicKeyCredentialCreationOptionsJSON of the new passkey, passed to navigator.credentials.create(). Its challenge is bound to the person and to `auth_session`.
      Returns:
      publicKeyCreation
    • setPublicKeyCreation

      public void setPublicKeyCreation(@Nullable PublicKeyCreationOptions publicKeyCreation)
    • totp

    • getTotp

      @Nullable public AuthorizationChallengeTotpEnrolment getTotp()
      After totp-enrolment: the secret of the authenticator app being enrolled, shown once. The enrolment completes with totp-enrolment-verification and the app's first code.
      Returns:
      totp
    • setTotp

      public void setTotp(@Nullable AuthorizationChallengeTotpEnrolment totp)
    • recoveryCodes

      public AuthorizationChallengeResponse recoveryCodes(@Nullable List<String> recoveryCodes)
    • addRecoveryCodesItem

      public AuthorizationChallengeResponse addRecoveryCodesItem(String recoveryCodesItem)
    • getRecoveryCodes

      @Nullable public List<String> getRecoveryCodes()
      The person's first ten recovery codes, on the answer that follows the enrolment of their first passkey or authenticator app. A sign-in started from an activation or recovery link receives them on the answer that completes it, and they replace any codes held before. Shown once: store them offline. Each opens recovery once.
      Returns:
      recoveryCodes
    • setRecoveryCodes

      public void setRecoveryCodes(@Nullable List<String> recoveryCodes)
    • recoverabilityRecommended

      public AuthorizationChallengeResponse recoverabilityRecommended(@Nullable Boolean recoverabilityRecommended)
    • getRecoverabilityRecommended

      @Nullable public Boolean getRecoverabilityRecommended()
      On the code that completes the setup of a platform administrator: a second platform administrator and a break-glass account are recommended, so the platform stays recoverable if this passkey is lost. It blocks nothing.
      Returns:
      recoverabilityRecommended
    • setRecoverabilityRecommended

      public void setRecoverabilityRecommended(@Nullable Boolean recoverabilityRecommended)
    • requestUri

      public AuthorizationChallengeResponse requestUri(@Nullable String requestUri)
    • getRequestUri

      @Nullable public String getRequestUri()
      403 redirect_to_web only. The single-use reference of this sign-in, presented once as the request_uri query parameter of GET /api/v3/auth/idp/initiate by a top-level browser navigation.
      Returns:
      requestUri
    • setRequestUri

      public void setRequestUri(@Nullable String requestUri)
    • expiresIn

      public AuthorizationChallengeResponse expiresIn(@Nullable Long expiresIn)
    • getExpiresIn

      @Nullable public Long getExpiresIn()
      403 redirect_to_web only. How long request_uri is honoured, in seconds: at most 60, never past the sign-in's own lifetime. minimum: 1 maximum: 60
      Returns:
      expiresIn
    • setExpiresIn

      public void setExpiresIn(@Nullable Long expiresIn)
    • passkeyAvailable

      public AuthorizationChallengeResponse passkeyAvailable(@Nullable Boolean passkeyAvailable)
    • getPasskeyAvailable

      @Nullable public Boolean getPasskeyAvailable()
      403 insufficient_authorization only. Whether a passkey can be used on the address the console is open on. A passkey belongs to the deployment's Management host name, so on another address of the deployment (such as the host's IP address) this is false, no passkey method or path is offered, and the sign-in continues with a password and an authenticator app. The client shows this statement as it is; it never decides it from its own address. Absent when the answer makes no statement.
      Returns:
      passkeyAvailable
    • setPasskeyAvailable

      public void setPasskeyAvailable(@Nullable Boolean passkeyAvailable)
    • passkeyUnavailableReason

      public AuthorizationChallengeResponse passkeyUnavailableReason(@Nullable String passkeyUnavailableReason)
    • getPasskeyUnavailableReason

      @Nullable public String getPasskeyUnavailableReason()
      Present only when passkey_available is false: why a passkey cannot be used here. origin-not-relying-party: the console is open on an address that is not the deployment's Management host name; open the console on that host name to use a passkey.
      Returns:
      passkeyUnavailableReason
    • setPasskeyUnavailableReason

      public void setPasskeyUnavailableReason(@Nullable String passkeyUnavailableReason)
    • 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 AuthorizationChallengeResponse
    • 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 AuthorizationChallengeResponse
    • fromJson

      public static AuthorizationChallengeResponse fromJson(String jsonString) throws IOException
      Create an instance of AuthorizationChallengeResponse given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of AuthorizationChallengeResponse
      Throws:
      IOException - if the JSON string is invalid with respect to AuthorizationChallengeResponse
    • toJson

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