AuthorizationCodeFlow
data class AuthorizationCodeFlow(val authorizeUrl: String, val tokenUrl: String, val clientId: String, val redirect: LoopbackRedirect, val scopes: String? = null, val clientSecret: String? = null, val extraAuthorizeParams: Map<String, String> = emptyMap(), val extraTokenParams: Map<String, String> = emptyMap(), val nonce: Boolean = false, val echoChallengeOnExchange: Boolean = false, val redirectParam: String = "redirect_uri", val usesState: Boolean = true) : SignInFlow(source)
The authorization-code grant with PKCE (RFC 6749 §4.1 + RFC 7636) through a loopback redirect (RFC 8252 §7.3): the app listens on LoopbackRedirect.port while the user signs in in the browser.
Constructors
Link copied to clipboard
constructor(authorizeUrl: String, tokenUrl: String, clientId: String, redirect: LoopbackRedirect, scopes: String? = null, clientSecret: String? = null, extraAuthorizeParams: Map<String, String> = emptyMap(), extraTokenParams: Map<String, String> = emptyMap(), nonce: Boolean = false, echoChallengeOnExchange: Boolean = false, redirectParam: String = "redirect_uri", usesState: Boolean = true)
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Also send the code_challenge pair on exchange (a few servers insist).
Link copied to clipboard
Extra query parameters some servers require on the authorize URL.
Link copied to clipboard
Extra form parameters on the token request (e.g. the RFC 8707 resource indicator).
Link copied to clipboard
Link copied to clipboard
Name of the redirect parameter (OpenRouter calls it callback_url).