PowAssent v0.1.0-alpha.10 PowAssent.Strategy.OAuth2.Base behaviour View Source
OAuth 2.0 strategy base.
Usage
defmodule MyApp.MyOAuth2Stratey do
use PowAssent.Strategy.OAuth2
def default_config(_config) do
[
site: "https://api.example.com",
user_url: "/authorization.json"
]
end
def normalize(_client, _config, user) do
%{
"uid" => user["id"],
"name" => user["name"],
"email" => user["email"]
}
end
end
Link to this section Summary
Link to this section Callbacks
Link to this callback
normalize(arg0, arg1, map)
View Source
normalize(OAuth2.Client.t(), Keyword.t(), map()) :: {:ok, map()} | {:error, any()}