InteractionCodeFlow
The InteractionCodeFlow class is used to define and initiate an authentication workflow utilizing the Okta Identity Engine.
Usage: call start to begin the workflow, then resume to retrieve the initial IdxResponse. From there, repeatedly set the desired form field values on a remediation and call proceed to advance through the workflow until IdxResponse.isLoginSuccessful is true, then call exchangeInteractionCodeForTokens to obtain tokens. All of these are suspend functions and must be called from a coroutine. An InteractionCodeFlow instance is stateful: it retains the context created by start and must not be reused concurrently for unrelated authentication attempts.
Constructors
Initializes a new InteractionCodeFlow, using the given client.
Initializes a new InteractionCodeFlow.
Initializes a new InteractionCodeFlow.
Properties
The OAuth2Client used to make authorization-server requests for this flow.
Functions
Evaluates the given redirect url to determine what next steps can be performed. This is usually used when receiving a redirection from an IDP authentication flow.
Exchanges the IdxRemediation.Type.ISSUE remediation for tokens once IdxResponse.isLoginSuccessful is true.
Executes the given remediation and advances the workflow using the values currently set on its form fields.
Resumes the authentication state to identify the available remediation steps.
Starts the authentication session. Returns an empty OAuth2ClientResult.Success on success, and a OAuth2ClientResult.Error with the corresponding exception on failure.