View Source ExOauth2Provider.Token.AuthorizationCode (ExOauth2Provider v0.5.7)
Functions for dealing with authorization code strategy.
Summary
Functions
Will grant access token by client credentials.
Functions
Will grant access token by client credentials.
Example
ExOauth2Provider.Token.grant(%{
"code" => "1jf6a",
"client_id" => "Jf5rM8hQBc",
"client_secret" => "secret",
"redirect_uri" => "https://example.com/",
"grant_type" => "authorization_code"
}, otp_app: :my_app)
Response
{:ok, access_token}
{:error, %{error: error, error_description: description}, http_status}