Expand description
OAuth 2.1 Client Registration (RFC 7591) and Client ID Metadata Documents.
Two registration paths:
- Client ID Metadata Documents (preferred): client_id is an HTTPS URL
- Dynamic Client Registration (fallback): POST /oauth/register
Structs§
- Client
IdMetadata Document - Client ID Metadata Document (draft-ietf-oauth-client-id-metadata-document-00 §4).
- Registration
Request - Dynamic client registration request (RFC 7591 §3.1).
- Registration
Response - Dynamic client registration response (RFC 7591 §3.2.1).
Constants§
- DCR_
MAX_ CLIENTS - Maximum number of dynamically-registered (RFC 7591) clients held in
state.clients. The DCR endpoint is unauthenticated by design (the whole point is bootstrapping new clients), so a hard cap bounds the memory amplifier even when an attacker pummels POST /oauth/register. CIMD clients are NOT counted here — they live in cimd_cache, which has its own capacity bound. - DCR_
MAX_ NAME_ LEN - DCR_
MAX_ REDIRECT_ URIS - Maximum DCR field lengths to bound request-payload memory.
- DCR_
MAX_ URI_ LEN
Functions§
- fetch_
client_ metadata - Fetch and validate a Client ID Metadata Document from an HTTPS URL.
- register_
client - POST /oauth/register — Dynamic Client Registration (RFC 7591)
- resolve_
cimd_ client - Resolve a CIMD client: cache-aside lookup, fetch on miss.
- validate_
redirect_ uri - Validate a redirect_uri against a client’s registered URIs.