ResourceOwnerFlow

An authentication flow that implements the Resource Owner Password Grant.

This simple authentication flow permits a user to authenticate using a username and password.

Important: Resource Owner authentication does not support MFA or other more secure authentication models, and is not recommended for production applications.

Example usage:

val flow = ResourceOwnerFlowImpl(client)
val result = flow.start("user@example.com", "password", "openid profile")
result.onSuccess { tokenInfo -> println("Access token: ${tokenInfo.accessToken}") }
result.onFailure { error -> println("Authentication failed: $error") }

See also

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun start(username: String, password: String, scope: String): ERROR CLASS: Symbol not found for Result<ERROR CLASS: Symbol not found for TokenInfo>

Initiates the Resource Owner flow by exchanging credentials for tokens.