AuthorizationCodeFlow

Deprecated

The Android-only AuthorizationCodeFlow is deprecated in favor of the KMP variant, which works on Android and JVM. Use com.okta.oauth2.kmp.AuthorizationCodeFlow instead, or the higher-level com.okta.webauthenticationui.WebAuthentication which is already KMP-backed. This class will be removed in a future major release.

AuthorizationCodeFlow encapsulates the behavior required to authentication using an OIDC Browser redirect flow.

See Authorization Code Flow documentation

Constructors

Link copied to clipboard
constructor(client: OAuth2Client)
constructor()

Initializes an authorization code flow.

constructor(oidcConfiguration: OidcConfiguration)

Initializes an authorization code flow using the OidcConfiguration.

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class Context

A model representing the context and current state for an authorization session.

Link copied to clipboard

Functions

Link copied to clipboard

Resumes the OIDC Authorization Code redirect flow. This method takes the returned redirect Uri, and communicates with the Authorization Server to exchange that for a token.

Link copied to clipboard
suspend fun start(redirectUrl: String, extraRequestParameters: Map<String, String> = emptyMap(), scope: String = client.configuration.defaultScope, state: String = UUID.randomUUID().toString()): OAuth2ClientResult<AuthorizationCodeFlow.Context>
suspend fun start(redirectUrl: String, extraRequestParameters: Map<String, String> = emptyMap(), scope: List<String>, state: String = UUID.randomUUID().toString()): OAuth2ClientResult<AuthorizationCodeFlow.Context>

Initiates the OIDC Authorization Code redirect flow.