SessionTokenFlow

Implements the Session Token authentication flow.

Use this flow to exchange a session token issued by the legacy Okta Authn API for OIDC tokens, for example when migrating a user session established through the Authn API into this SDK's token-based flows.

Exchanges a session token (obtained from the Okta legacy Authn API) for OAuth2 tokens by:

  1. Building an authorization URL with the session token as an extra parameter.

  2. Making a GET request to the authorization URL and capturing the redirect Location header.

  3. Exchanging the authorization code in the redirect URI for tokens.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val client: ERROR CLASS: Symbol not found for OAuth2Client

The OAuth2Client instance used for token requests.

Functions

Link copied to clipboard
abstract suspend fun start(sessionToken: String, redirectUrl: String, scope: List<String> = client.configuration.defaultScope, extraRequestParameters: Map<String, String> = emptyMap()): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for TokenInfo>

Initiates the session token flow and returns a TokenInfo on success.