PowAssent v0.1.0-alpha.5 PowAssent.Strategy behaviour View Source
Used for creating strategies.
Usage
Set up my_strategy.ex
the following way:
defmodule MyStrategy do
use PowAssent.Strategy
def authorize_url(config, conn) do
# generate authorization url
end
def callback(config, conn, params) do
# return normalized user params map
end
end
Link to this section Summary
Functions
Recursively prunes map for nil values
Link to this section Functions
Recursively prunes map for nil values.
Link to this section Callbacks
Link to this callback
authorize_url(arg0, arg1)
View Source
authorize_url(Keyword.t(), Plug.Conn.t()) :: {:ok, %{:conn => Plug.Conn.t(), :url => binary(), optional(atom()) => any()}} | {:error, %{conn: Plug.Conn.t(), error: any()}}
Link to this callback
callback(arg0, arg1, map)
View Source
callback(Keyword.t(), Plug.Conn.t(), map()) :: {:ok, %{:conn => Plug.Conn.t(), :user => map(), optional(atom()) => any()}} | {:error, %{conn: Plug.Conn.t(), error: any()}}