# `Firkin.Auth`
[🔗](https://harton.dev/james/firkin)

S3 Signature Version 4 authentication.

Supports both the Authorization header and presigned URL query parameters.

# `auth_result`

```elixir
@type auth_result() ::
  {:ok, Firkin.Backend.auth_context()}
  | {:error, :invalid_signature | :credential_not_found | :expired}
```

# `authenticate`

```elixir
@spec authenticate(Plug.Conn.t(), module()) :: auth_result()
```

Authenticates an incoming request using the backend's credential lookup.

Tries the Authorization header first, then falls back to presigned URL
query parameters.

---

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