Pow v1.0.8 PowInvitation.Plug View Source
Plug helper methods.
Link to this section Summary
Functions
Assigns a :invited_user
key with the user in the connection
Creates a changeset from the user fetched in the connection
Creates a new invited user by the current user in the connection
Fetches invited user by the invitation token
Updates current user in the connection with the params
Link to this section Functions
Link to this function
assign_invited_user(conn, user)
View Source
assign_invited_user(conn, user)
View Source
assign_invited_user(Plug.Conn.t(), map()) :: Plug.Conn.t()
assign_invited_user(Plug.Conn.t(), map()) :: Plug.Conn.t()
Assigns a :invited_user
key with the user in the connection.
Link to this function
change_user(conn, params \\ %{})
View Source
change_user(conn, params \\ %{})
View Source
change_user(Plug.Conn.t(), map()) :: map()
change_user(Plug.Conn.t(), map()) :: map()
Creates a changeset from the user fetched in the connection.
Link to this function
create_user(conn, params)
View Source
create_user(conn, params)
View Source
create_user(Plug.Conn.t(), map()) ::
{:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
create_user(Plug.Conn.t(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Creates a new invited user by the current user in the connection.
Link to this function
invited_user_from_token(conn, token)
View Source
invited_user_from_token(conn, token)
View Source
invited_user_from_token(Plug.Conn.t(), binary()) :: map() | nil
invited_user_from_token(Plug.Conn.t(), binary()) :: map() | nil
Fetches invited user by the invitation token.
Link to this function
update_user(conn, params)
View Source
update_user(conn, params)
View Source
update_user(Plug.Conn.t(), map()) ::
{:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
update_user(Plug.Conn.t(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Updates current user in the connection with the params.
If successful the session will be regenerated.