Coherence v0.4.0 Coherence.Authentication.Basic

Implements basic HTTP authentication. To use add:

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

to your pipeline.

This module is derived from https://github.com/bitgamma/plug_auth which is derived from https://github.com/lexmag/blaguth

Link to this section Summary

Functions

Callback implementation for Plug.call/2

Returns the encoded form for the given user and password combination

Callback implementation for Plug.init/1

Update login store for a user. user_data can be any term but must not be nil

Link to this section Types

Link to this section Functions

Link to this function call(conn, opts)

Callback implementation for Plug.call/2.

Link to this function create_login(email, password, user_data, opts \\ [])
create_login(String.t, String.t, t, Keyword.t) :: t
Link to this function encode_credentials(user, password)
encode_credentials(atom | String.t, String.t | nil) :: String.t

Returns the encoded form for the given user and password combination.

Callback implementation for Plug.init/1.

Link to this function update_login(email, password, user_data, opts \\ [])
update_login(String.t, String.t, t, Keyword.t) :: t

Update login store for a user. user_data can be any term but must not be nil.