Documentation
¶
Overview ¶
Example 02: Resource Token with HS256 (Federated Auth).
Building on Example 01: a registered app mints resource-scoped tokens for individual users — not just for itself. The resource server validates with the same KeyStore the app's secret was registered into.
Two-process architecture (mirrors Example 01):
make serve # auth server :8081, resource server :8082 make demo # demokit walkthrough (--tui for the styled TUI)
In --serve mode the auth server and resource server share an in-process KeyStore (registration on the AS makes the secret visible to the RS for validation). A real deployment would back this with a persisted KeyStore (FS / GORM / GAE).
See: https://www.rfc-editor.org/rfc/rfc7519 (JWT)
Click to show internal directories.
Click to hide internal directories.