DeviceAuthorizationFlow
A Java-friendly wrapper around the Kotlin KotlinDeviceAuthorizationFlow.
This class exposes async methods returning CompletableFuture so Java consumers can use the Device Authorization flow without dealing with Kotlin coroutines.
Typical Java usage:
DeviceAuthorizationFlow flow = new DeviceAuthorizationFlow(kmpClient);
DeviceAuthorizationFlowContext ctx = flow.start(scope).get();
TokenInfo token = flow.resume(ctx).get();
flow.close();Content copied to clipboard
Must be closed when no longer needed to release coroutine resources.
Parameters
delegate
the underlying Kotlin KotlinDeviceAuthorizationFlow instance.
Constructors
Link copied to clipboard
Creates a DeviceAuthorizationFlow backed by the given KmpOAuth2Client.
Functions
Link copied to clipboard
Polls for authorization completion asynchronously.
Link copied to clipboard
fun start(scope: String = "openid profile email offline_access"): CompletableFuture<DeviceAuthorizationFlowContext>
Initiates the device authorization flow asynchronously.