Packages
phauxth
0.8.0
2.5.1
retired
2.5.0
2.4.0
2.3.2
2.3.1
2.3.0
2.2.0
2.1.1
2.1.0
2.0.1
2.0.0
2.0.0-rc.2
2.0.0-rc.1
2.0.0-rc.0
2.0.0-beta.1
2.0.0-beta.0
2.0.0-alpha.5
2.0.0-alpha.4
retired
2.0.0-alpha.3
retired
2.0.0-alpha.2
retired
2.0.0-alpha.1
retired
2.0.0-alpha.0
retired
1.2.9
1.2.8
1.2.7
1.2.6
1.2.5
1.2.4
1.2.3
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0
0.17.1
0.17.0
0.16.0
0.15.1
0.15.0
0.14.0
0.13.0-rc.1
0.13.0-rc.0
0.12.1-rc.1
0.12.1-rc.0
0.12.0-rc
0.11.0
0.10.3
0.10.2
0.10.0
0.9.0
0.8.2
0.8.1
0.8.0
Authentication library for Phoenix, and other Plug-based, web applications
Current section
Files
Jump to
Current section
Files
lib/phauxth.ex
defmodule Phauxth do
@moduledoc """
A collection of functions to be used to authenticate Phoenix web apps.
Phauxth is designed to be secure, extensible and well-documented.
The following functionality is provided by Phauxth.
## Authentication
* Phauxth.Authenticate
* authenticate the user, using Plug sessions or Phoenix tokens
* set the current_user value
* Phauxth.AbsintheAuthenticate
* authenticate the user and set the absinthe context
* this also provides an example of how the Phauxth.Authenticate.Base module can be customized
* Phauxth.Remember
* authenticates the user using a remember_me cookie
## Login
* Phauxth.Login
* login using a password
* this uses Comeonin.Bcrypt by default, but a custom hash function can be used
* Phauxth.Otp
* login using a one-time password
## Email / phone confirmation and password resetting
Email / phone confirmation and password resetting is provided by a
separate library, PhauxthConfirm.
## Helper functions
There are also helper functions provided to add and delete the
remember_me cookie, and to add a password hash to the database.
## Getting started with Phauxth
The easiest way to get started is to use the phauxth_new
installer. First, download and install it:
mix archive.install https://github.com/riverrun/phauxth/raw/master/installer/archives/phauxth_new.ez
Then run the `mix phauxth.new` command in the main directory
of the Phoenix app. The following options are available:
* `--api` - create files for an api
* `--confirm` - add files for email confirmation
You can find more information at the
[Phauxth wiki](https://github.com/riverrun/phauxth/wiki).
"""
end