Phauxth v0.8.0 Phauxth.Authenticate.Base

Base module for authentication.

This is used by Phauxth.Authenticate and Phauxth.AbsintheAuthenticate. It can also be used to produce a custom authentication module.

Summary

Functions

Check the headers for an authorization token

Check the conn to see if the user is registered in the current session

Check the authorization token

Set the current_user value

Functions

check_headers(headers, context, max_age)

Check the headers for an authorization token.

This function also calls the database to get user information.

check_session(conn)

Check the conn to see if the user is registered in the current session.

This function also calls the database to get user information.

check_token(token, context, max_age)

Check the authorization token.

This function also calls the database to get user information.

set_current_user(user, conn)

Set the current_user value.