06-dynamic-client-registration

command
v0.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

06: Dynamic Client Registration

Non-UI · No infrastructure needed · RFC 7591

Self-service client onboarding via POST /apps/dcr — same request shape works against OneAuth, Keycloak, and any compliant AS. Covers both client_secret_post and private_key_jwt flows.

Two-process architecture

main.go boots an auth server with /apps/dcr (RFC 7591) plus the discovery, token, and JWKS endpoints needed for a freshly-registered client to immediately mint tokens. With --serve, anyone (including the walkthrough) can hit /apps/dcr.

Quick start

make demo                              # interactive walkthrough
make serve                             # auth :8081

# Drive DCR by hand
curl -s -X POST http://localhost:8081/apps/dcr \
  -H 'Content-Type: application/json' \
  -d '{"client_name":"Hand Demo","grant_types":["client_credentials"]}' | jq

Optional: against Keycloak

cd ..  && make upkcl
cd 06-dynamic-client-registration && make demo  # last step posts DCR to KC

See WALKTHROUGH.md for the full step-by-step.

Targets

make … What
demo (default) Walkthrough with TUI renderer
demo-plain Plain renderer
demo-ci Non-interactive
serve Bind AS on a real port
walkthrough Regenerate WALKTHROUGH.md

What's next

07 — Client SDK — production token-source patterns.

Documentation

Overview

Example 06: Dynamic Client Registration (RFC 7591).

Self-service client onboarding via the standard DCR endpoint (`/apps/dcr`) — same request shape works against OneAuth, Keycloak, Auth0, and any compliant AS. Supports both client_secret_post and private_key_jwt registrations.

Two-process architecture:

make serve   # auth :8081 with /apps/dcr + token + JWKS + discovery
make demo    # walkthrough that drives both

See: https://www.rfc-editor.org/rfc/rfc7591

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL