Pow v1.0.8 PowResetPassword.Plug View Source
Plug helper methods.
Link to this section Summary
Functions
Assigns a :reset_password_user
key with the user in the connection
Creates a changeset from the user fetched in the connection
Finds a user for the provided params, creates a token, and stores the user for the token
Updates the password for the user fetched in the connection
Fetches user from the store by the provided token
Link to this section Functions
Link to this function
assign_reset_password_user(conn, user)
View Source
assign_reset_password_user(conn, user)
View Source
assign_reset_password_user(Plug.Conn.t(), map()) :: Plug.Conn.t()
assign_reset_password_user(Plug.Conn.t(), map()) :: Plug.Conn.t()
Assigns a :reset_password_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_reset_token(conn, params)
View Source
create_reset_token(conn, params)
View Source
create_reset_token(Plug.Conn.t(), map()) ::
{:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
create_reset_token(Plug.Conn.t(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Finds a user for the provided params, creates a token, and stores the user for the token.
Link to this function
update_user_password(conn, params)
View Source
update_user_password(conn, params)
View Source
update_user_password(Plug.Conn.t(), map()) ::
{:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
update_user_password(Plug.Conn.t(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Updates the password for the user fetched in the connection.
Link to this function
user_from_token(conn, token)
View Source
user_from_token(conn, token)
View Source
user_from_token(Plug.Conn.t(), binary()) :: map() | nil
user_from_token(Plug.Conn.t(), binary()) :: map() | nil
Fetches user from the store by the provided token.