Pow v0.1.0-alpha Pow.Plug.Base behaviour View Source

This plug macro will set the :pow_config key, and attempt to fetch and assign a user in the connection, if it has not already been assigned.

You can use this to build your own pow plug:

defmodule MyAppWeb.Pow.Plug do use Pow.Plug.Base

def fetch(conn, config) do

# Fetch user from conn

end

def create(conn, user, config) do

# Create new user auth in conn

end

def delete(conn, config) do

# Delete user auth from conn

end

The user will be assigned automatically in any of the operations. end

Link to this section Summary

Link to this section Callbacks

Link to this callback fetch(arg0, arg1) View Source
fetch(Plug.Conn.t(), Pow.Config.t()) :: map() | nil