The host-owned dynamic client registration persistence contract (RFC 7591 §3 / RFC 7592 §2).
The registration controller owns credential generation and protocol framing,
but the client registry is host-owned: it persists a newly registered
client, deletes one during registration management cleanup, and exposes the
stored registration access-token hash for management requests. A host
implements this behaviour and wires each callback into
AttestoPhoenix.Config; this module is the contract those keys install and
the recommended production shape.
Each @callback corresponds to the identically named AttestoPhoenix.Config
key:
register_client/1(:register_client, required when:registration_enabled)unregister_client/1(:unregister_client)client_registration_access_token_hash/1(:client_registration_access_token_hash)
Summary
Callbacks
Return the stored hash of the registration access token issued with a dynamic
client (RFC 7592 §2), or nil. When the Config key is unset, DELETE requests
fail closed.
Persist a dynamically registered client (RFC 7591 §3.2.1).
Delete a dynamically registered client during registration management cleanup
(RFC 7592 §2). Returns :ok, {:ok, client}, or {:error, reason}. When
the Config key is unset, DELETE requests to the management endpoint fail
closed.
Types
@type client() :: term()
The host's opaque client representation.
Callbacks
Return the stored hash of the registration access token issued with a dynamic
client (RFC 7592 §2), or nil. When the Config key is unset, DELETE requests
fail closed.
Persist a dynamically registered client (RFC 7591 §3.2.1).
Receives the validated, issuance-ready attributes (the at-rest secret hash,
never the plaintext). Returns {:ok, client} or {:error, reason}; a store
rejection surfaces to the caller as invalid_client_metadata rather than a
server fault.
Delete a dynamically registered client during registration management cleanup
(RFC 7592 §2). Returns :ok, {:ok, client}, or {:error, reason}. When
the Config key is unset, DELETE requests to the management endpoint fail
closed.