Skip to main content

Module registration

Module registration 

Source
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§

ClientIdMetadataDocument
Client ID Metadata Document (draft-ietf-oauth-client-id-metadata-document-00 §4).
RegistrationRequest
Dynamic client registration request (RFC 7591 §3.1).
RegistrationResponse
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.