PowAssent v0.2.2 PowAssent.Strategy.OAuth.Base behaviour View Source
OAuth 1.0 strategy base.
Usage
defmodule MyApp.MyOAuthStratey do
use PowAssent.Strategy.OAuth
def default_config(_config) do
[
site: "https://api.example.com",
authorize_url: "/authorization/new",
token_url: "/authorization/token",
user_url: "/authorization.json",
authorization_params: [scope: "default"]
]
end
def normalize(_config, user) do
{:ok, %{
"uid" => user["id"],
"name" => user["name"],
"email" => user["email"]
}}
end
end