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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum403 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?static enum403 only. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMethodsItem(String methodsItem) addPathsItem(AuthorizationChallengePath pathsItem) addRecoveryCodesItem(String recoveryCodesItem) addTenantsItem(AuthorizationChallengeTenantOption tenantsItem) authorizationCode(String authorizationCode) authSession(String authSession) booleanCreate an instance of AuthorizationChallengeResponse given an JSON string200 only.403 insufficient_authorization only.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?The wire value oferror: what the server sent, verbatim.403 redirect_to_web only.403 only.getNext()403 only.The wire value ofnext: what the server sent, verbatim.403 insufficient_authorization only.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.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.The WebAuthn PublicKeyCredentialRequestOptionsJSON of a passkey assertion, present when passkey is one of `methods`.After passkey-registration-options: the WebAuthn PublicKeyCredentialCreationOptionsJSON of the new passkey, passed to navigator.credentials.create().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.The person's first ten recovery codes, on the answer that follows the enrolment of their first passkey or authenticator app.403 redirect_to_web only.next=tenant-selection only: the tenants the person may enter.getTotp()After totp-enrolment: the secret of the authenticator app being enrolled, shown once.inthashCode()passkeyAvailable(Boolean passkeyAvailable) passkeyUnavailableReason(String passkeyUnavailableReason) paths(List<AuthorizationChallengePath> paths) publicKey(PublicKeyRequestOptions publicKey) publicKeyCreation(PublicKeyCreationOptions publicKeyCreation) recoverabilityRecommended(Boolean recoverabilityRecommended) recoveryCodes(List<String> recoveryCodes) requestUri(String requestUri) voidsetAuthorizationCode(String authorizationCode) voidsetAuthSession(String authSession) voidvoidsetExpiresIn(Long expiresIn) voidsetMethods(List<String> methods) voidvoidsetPasskeyAvailable(Boolean passkeyAvailable) voidsetPasskeyUnavailableReason(String passkeyUnavailableReason) voidsetPaths(List<AuthorizationChallengePath> paths) voidsetPublicKey(PublicKeyRequestOptions publicKey) voidsetPublicKeyCreation(PublicKeyCreationOptions publicKeyCreation) voidsetRecoverabilityRecommended(Boolean recoverabilityRecommended) voidsetRecoveryCodes(List<String> recoveryCodes) voidsetRequestUri(String requestUri) voidsetTenants(List<AuthorizationChallengeTenantOption> tenants) voidtenants(List<AuthorizationChallengeTenantOption> tenants) toJson()Convert an instance of AuthorizationChallengeResponse 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_AUTHORIZATION_CODE
- See Also:
-
SERIALIZED_NAME_ERROR
- See Also:
-
SERIALIZED_NAME_AUTH_SESSION
- See Also:
-
SERIALIZED_NAME_NEXT
- See Also:
-
SERIALIZED_NAME_METHODS
- See Also:
-
SERIALIZED_NAME_PUBLIC_KEY
- See Also:
-
SERIALIZED_NAME_TENANTS
- See Also:
-
SERIALIZED_NAME_PATHS
- See Also:
-
SERIALIZED_NAME_PUBLIC_KEY_CREATION
- See Also:
-
SERIALIZED_NAME_TOTP
- See Also:
-
SERIALIZED_NAME_RECOVERY_CODES
- See Also:
-
SERIALIZED_NAME_RECOVERABILITY_RECOMMENDED
- See Also:
-
SERIALIZED_NAME_REQUEST_URI
- See Also:
-
SERIALIZED_NAME_EXPIRES_IN
- See Also:
-
SERIALIZED_NAME_PASSKEY_AVAILABLE
- See Also:
-
SERIALIZED_NAME_PASSKEY_UNAVAILABLE_REASON
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
AuthorizationChallengeResponse
public AuthorizationChallengeResponse()
-
-
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
-
getNextAsString
The wire value ofnext: 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()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
-
authorizationCode
-
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
-
error
public AuthorizationChallengeResponse error(@Nullable AuthorizationChallengeResponse.ErrorEnum error) -
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
-
authSession
-
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
-
next
-
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
-
methods
-
addMethodsItem
-
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
-
publicKey
-
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
-
tenants
public AuthorizationChallengeResponse tenants(@Nullable List<AuthorizationChallengeTenantOption> tenants) -
addTenantsItem
public AuthorizationChallengeResponse addTenantsItem(AuthorizationChallengeTenantOption tenantsItem) -
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
-
paths
-
addPathsItem
-
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
-
publicKeyCreation
public AuthorizationChallengeResponse publicKeyCreation(@Nullable PublicKeyCreationOptions publicKeyCreation) -
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
-
totp
-
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
-
recoveryCodes
-
addRecoveryCodesItem
-
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
-
recoverabilityRecommended
public AuthorizationChallengeResponse recoverabilityRecommended(@Nullable Boolean recoverabilityRecommended) -
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
-
requestUri
-
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
-
expiresIn
-
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
-
passkeyAvailable
-
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
-
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 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 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 AuthorizationChallengeResponse
-
fromJson
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
Convert an instance of AuthorizationChallengeResponse to an JSON string- Returns:
- JSON string
-