elli_basicauth
Basic authentication middleware for elli
Installation
{deps, [
{elli, "2.0.2"},
{elli_basicauth, "0.1.0"}
]}.Example
Start an Erlang shell with elli and elli_basicauth loaded.
rebar3 as test shellStart elli_basicauth_example.
1> {ok, Pid} = elli_basicauth_example:start_link().Make requests, e.g. using HTTPie.
http :8080/protectedHTTP/1.1 401 Unauthorized Connection: Keep-Alive Content-Length: 12 WWW-Authenticate: Basic realm="Admin Area" Unauthorizedhttp -a user:pass :8080/protectedHTTP/1.1 403 Forbidden Connection: Keep-Alive Content-Length: 9 Forbidden