PowAssent v0.2.0 PowAssent.Strategy behaviour View Source
Used for creating strategies.
Usage
Set up my_strategy.ex
the following way:
defmodule MyStrategy do
@behaviour PowAssent.Strategy
def authorize_url(config) do
# Generate redirect URL
{:ok, url, []}
end
def callback(config, params) do
# Fetch user data
{:ok, user, []}
end
end
Link to this section Summary
Functions
Decode a JSON response to a map
Decodes a request response
Recursively prunes map for nil values
Makes a HTTP request
Generates a URL
Link to this section Functions
Decode a JSON response to a map
Decodes a request response.
Recursively prunes map for nil values.
Makes a HTTP request.
Generates a URL