Function: createCantonAuthorizationCodeProvider()
createCantonAuthorizationCodeProvider(
config:AuthorizationCodeAuthConfig,initialToken:AccessToken,fetchToken: () =>Promise<AccessToken>,options?:OAuthRequestOptions):CantonAuthorizationCodeProvider
Defined in: canton/authentication/authorization-code.ts:461
Create an AuthorizationCodeProvider from an initial token and a re-fetch callback.
Convenience wrapper around the AuthorizationCodeProvider constructor.
The embedder is responsible for obtaining initialToken via the protocol
helpers (buildAuthorizationRequest → validateAuthorizationCallback
→ exchangeAuthorizationCode).
Parameters
| Parameter | Type | Description |
|---|---|---|
config | AuthorizationCodeAuthConfig | Authorization code config (used for refresh). |
initialToken | AccessToken | The token obtained from the interactive flow. |
fetchToken | () => Promise<AccessToken> | Called when the cached token expires and refresh fails. |
options? | OAuthRequestOptions | Optional fetch override and abort signal. |