TokenExchangeFlow

Implements the Token Exchange flow for Native SSO.

Use start to exchange an existing ID token and device secret for new tokens:

val flow = TokenExchangeFlow(client)
val tokenInfo = flow.start(idToken = "...", deviceSecret = "...", scope = listOf("openid")).getOrThrow()

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(idToken: String, deviceSecret: String, scope: List<String> = client.configuration.defaultScope, audience: String? = null): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for TokenInfo>

Initiates the token exchange flow.