PlugAuth.Authentication.Basic

Implements basic HTTP authentication. To use add:

plug PlugAuth.Authentication.Basic, realm: "Secret world"

to your pipeline. This module is derived from https://github.com/lexmag/blaguth

Summary

add_credentials(user, password, user_data)

Add the credentials for a user and password combination. user_data can be any term but must not be nil

call(conn, opts)

Callback implementation for c:Plug.call/2

init(opts)

Callback implementation for c:Plug.init/1

remove_credentials(user, password)

Remove the credentials for a user and password combination

update_credentials(user, old_password, new_password)

Changes the password for user from old_password to new_password

Functions

add_credentials(user, password, user_data)

Add the credentials for a user and password combination. user_data can be any term but must not be nil.

call(conn, opts)

Callback implementation for c:Plug.call/2.

init(opts)

Callback implementation for c:Plug.init/1.

remove_credentials(user, password)

Remove the credentials for a user and password combination.

update_credentials(user, old_password, new_password)

Changes the password for user from old_password to new_password.