ExDav.Authenticator behaviour (ExDav v0.1.0)

Copy Markdown View Source

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.

Summary

Callbacks

authenticate(t, opts)

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