defmodule ExDav.Authenticator do @moduledoc """ 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. """ @callback authenticate(Plug.Conn.t(), opts :: term()) :: {:ok, Plug.Conn.t(), principal :: String.t()} | :unauth end