AttestoClient.DynamicClientRegistration (AttestoClient v2.26.0)

Copy Markdown View Source

Minimal RFC 7591 Dynamic Client Registration client.

register/3 sends caller-supplied client metadata to a registration endpoint and returns the validated registration response. It deliberately does not decide when dynamic registration is appropriate, choose client metadata, or persist the resulting credentials; those are application or protocol-profile policy decisions.

The endpoint is subject to the same outbound screening, DNS pinning, deadline, redirect refusal, response-size limit, JSON media-type check, and duplicate-member rejection as the package's other OAuth HTTP operations. RFC 7591 requires HTTP 201 for a successful registration.

Summary

Functions

Register client_metadata at endpoint.

Types

error()

@type error() :: :invalid_client_metadata | :invalid_registration_response | term()

Functions

register(endpoint, client_metadata, opts \\ [])

@spec register(String.t(), map(), keyword()) :: {:ok, map()} | {:error, error()}

Register client_metadata at endpoint.

Metadata keys must be non-empty strings. Transport options are the standard AttestoClient outbound options accepted by OAuth endpoint requests. When the endpoint came from authorization-server metadata, pass that server's exact :issuer; this binds any loopback development exception to the issuer rather than to the endpoint it advertised.