SessionTokenFlow

A Java-friendly wrapper around the Kotlin KotlinSessionTokenFlow.

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

Typical Java usage:

SessionTokenFlow flow = new SessionTokenFlow(kmpClient);
TokenInfo token = flow.start(sessionToken, redirectUrl).get();
flow.close();

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

Parameters

delegate

the underlying Kotlin KotlinSessionTokenFlow instance.

Constructors

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

Creates a SessionTokenFlow backed by the given KmpOAuth2Client.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun start(sessionToken: String, redirectUrl: String, extraRequestParameters: Map<String, String> = emptyMap(), scope: String = "openid profile email offline_access"): CompletableFuture<TokenInfo>

Initiates the Session Token flow asynchronously.