ResourceOwnerFlow

A Java-friendly wrapper around the Kotlin KotlinResourceOwnerFlow.

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

Typical Java usage:

ResourceOwnerFlow flow = new ResourceOwnerFlow(kmpClient);
TokenInfo token = flow.start(username, password, scope).get();
flow.close();

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

Parameters

delegate

the underlying Kotlin KotlinResourceOwnerFlow instance.

Constructors

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

Creates a ResourceOwnerFlow backed by the given KmpOAuth2Client.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun start(username: String, password: String, scope: String): CompletableFuture<TokenInfo>

Initiates the Resource Owner flow asynchronously.