AuthN v0.2.0 API Reference

Modules

Allows to create a plug enforcing authentication for private routes.

Provides macros for defining the fields that are used for user accounts' credentials. identifier_field/1 defines the field storing the login name (usually the user's email or username) and password_field/1 defines the field storing the hashed password.

This plug fetches the current user by the user ID stored in session and stores the fetched user in conn.assigns.

This plug allows to change the storage mechanism for sessions.

Module used for storing, retrieving and deleting the user ID into/from the session.

Module for storing sessions into conn.private. Used for testing.

Module for storing sessions into stateless cookies.