Mints, signs, and verifies bounded self-identifying canonical tokens.
The signed body binds the algorithm, key identifier, namespace, keyed-effect key, issuance instant, and optional expiry instant. Verification requires an expected algorithm and namespace supplied outside the token.
Summary
Types
@type algorithm() :: :hmac_sha256 | :ed25519
@type result(value) :: {:ok, value} | {:error, AshOnetime.Error.t()}
@type t() :: %AshOnetime.Token{ algorithm: algorithm(), expires_at: DateTime.t() | nil, issued_at: DateTime.t(), key: binary(), key_id: binary(), namespace: binary() }