# `ExDav.Authenticator`
[🔗](https://git.sr.ht/~sbr/ExDav)

Behaviour for CalDAV authenticators.

Given a `Plug.Conn` and adapter-specific opts, an authenticator decides
whether the request is authorized and what principal name (CalDAV
username) to use for storage scoping.

See `ExDav.Authenticator.Basic` for an HTTP-Basic adapter.

# `authenticate`

```elixir
@callback authenticate(Plug.Conn.t(), opts :: term()) ::
  {:ok, Plug.Conn.t(), principal :: String.t()} | :unauth
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
