PowAssent v0.1.0-alpha.11 PowAssent.Plug View Source
Plug helper methods.
Link to this section Summary
Functions
Calls the authentication method for the strategy provider
Lists available strategy providers for connection
Calls the callback method for the strategy provider
Create a user with user identity
Deletes the associated user identity for the current user and strategy
Lists associated strategy providers for the user
Link to this section Functions
authenticate(Plug.Conn.t(), binary(), binary()) :: {:ok, binary(), Plug.Conn.t()} | {:error.any(), Plug.Conn.t()}
Calls the authentication method for the strategy provider.
A generated redirection URL will be returned.
available_providers(Plug.Conn.t()) :: [atom()]
Lists available strategy providers for connection.
callback(Plug.Conn.t(), binary(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, {:bound_to_different_user | :missing_user_id_field, map()}, Plug.Conn.t()} | {:error, {:strategy, any()}, Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Calls the callback method for the strategy provider.
A user will be created if a user doesn’t already exists in connection or for the associated user identity. If a matching user identity association doesn’t exist for the current user, a new user identity is created. Otherwise user is authenticated.
create_user(Plug.Conn.t(), binary(), map(), map()) :: {:ok, map(), Plug.Conn.t()} | {:error, map(), Plug.Conn.t()}
Create a user with user identity.
delete_identity(Plug.Conn.t(), binary()) :: {:ok, map(), Plug.Conn.t()} | {:error, any(), Plug.Conn.t()}
Deletes the associated user identity for the current user and strategy.
providers_for_current_user(Plug.Conn.t()) :: [atom()]
Lists associated strategy providers for the user.