Coherence.Authentication.Basic (Coherence v0.8.0)
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
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
.
Types
Link to this type
conn()
@type conn() :: Plug.Conn.t()
@type t() :: Ecto.Schema.t() | map()
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 \\ [])
Link to this function
encode_credentials(user, password)
@spec encode_credentials(atom() | String.t(), String.t() | nil) :: Coherence.CredentialStore.Types.credentials()
Returns the encoded form for the given user
and password
combination.
Link to this function
init(opts)
Callback implementation for Plug.init/1
.
Link to this function
update_login(email, password, user_data, opts \\ [])
Update login store for a user. user_data
can be any term but must not be nil
.