Wise OAuth 2.0 token exchange and refresh.
Summary
Functions
Generates the OAuth authorization URL.
Exchanges an authorization code for tokens.
Exchanges a registration code for tokens.
Refreshes an access token.
Functions
@spec authorization_url(Wise.Config.t(), String.t(), String.t(), keyword()) :: String.t()
Generates the OAuth authorization URL.
@spec exchange_code(Wise.Config.t(), String.t(), String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Wise.Error.t()}
Exchanges an authorization code for tokens.
@spec exchange_registration_code(Wise.Config.t(), String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Wise.Error.t()}
Exchanges a registration code for tokens.
@spec refresh_token(Wise.Config.t(), String.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Wise.Error.t()}
Refreshes an access token.