ueberauth_microsoft v0.8.0 Ueberauth.Strategy.Microsoft.OAuth

Link to this section Summary

Link to this section Functions

Link to this function authorize_url!(params \\ [], opts \\ [])
Link to this function authorize_url(client, params)

Builds the URL to the authorization endpoint.

Example

def authorize_url(client, params) do
  client
  |> put_param(:response_type, "code")
  |> put_param(:client_id, client.client_id)
  |> put_param(:redirect_uri, client.redirect_uri)
  |> merge_params(params)
end

Callback implementation for OAuth2.Strategy.authorize_url/2.

Link to this function client(opts \\ [])
Link to this function get_token!(params \\ [], opts \\ [])
Link to this function get_token(client, params, headers)

Builds the URL to the token endpoint.

Example

def get_token(client, params, headers) do
  client
  |> put_param(:code, params[:code])
  |> put_param(:grant_type, "authorization_code")
  |> put_param(:client_id, client.client_id)
  |> put_param(:client_secret, client.client_secret)
  |> put_param(:redirect_uri, client.redirect_uri)
  |> merge_params(params)
  |> put_headers(headers)
end

Callback implementation for OAuth2.Strategy.get_token/3.