Expand description
OAuth 2.1 Authorization Endpoint.
Handles the authorization code flow with PKCE (S256) and Ed25519 user authentication.
- GET /oauth/authorize — validates params, renders Ed25519 challenge form
- POST /oauth/authorize — verifies Ed25519 signature, generates auth code and redirects
The consent page was replaced with an Ed25519 challenge-response form. The nonce is
stored server-side (OAuthState::pending_nonces, 5-min TTL) and embedded as a hidden
form field. On POST, the server verifies the nonce was issued by itself and consumes it
(single-use). Challenge format:
"{fingerprint}:{nonce}:{code_challenge}"
The code_challenge binding prevents the signature from being reused against a different
PKCE session; the server-side nonce store enforces TTL and prevents replay. The client
never asserts a username — the server resolves it from fingerprint via the
pubkey:{fingerprint} → username reverse index in the UserStore.
Structs§
- Authorize
Params - Authorization request query parameters
- Authorize
Query - Loosely-typed authorize query.
- Consent
Form - Consent form submission (Ed25519 challenge-response).
Functions§
- authorize_
get - GET /oauth/authorize — validate params and render Ed25519 challenge form
- authorize_
post - POST /oauth/authorize — verify Ed25519 signature, issue auth code