Firkin.Auth (firkin v0.2.0)

Copy Markdown View Source

S3 Signature Version 4 authentication.

Supports both the Authorization header and presigned URL query parameters.

Summary

Functions

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

Types

auth_result()

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

Functions

authenticate(conn, backend)

@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.