TokenExchangeFlow

A Java-friendly wrapper around the Kotlin KotlinTokenExchangeFlow.

This class exposes async methods returning CompletableFuture so Java consumers can use the Token Exchange flow without dealing with Kotlin coroutines.

Typical Java usage:

TokenExchangeFlow flow = new TokenExchangeFlow(kmpClient);
TokenInfo token = flow.start(idToken, deviceSecret, null, scope).get();
flow.close();

Must be closed when no longer needed to release coroutine resources.

Parameters

delegate

the underlying Kotlin KotlinTokenExchangeFlow instance.

Constructors

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

Creates a TokenExchangeFlow backed by the given KmpOAuth2Client.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun start(idToken: String, deviceSecret: String, audience: String? = null, scope: String = "openid profile email offline_access"): CompletableFuture<TokenInfo>

Initiates the token exchange flow asynchronously.