Summary#
- Implements RFC 9126 Pushed Authorization Request (PAR) — clients POST
auth params to
POST /oauth/parand receive an opaquerequest_uri(60s TTL) to pass toGET /oauth/authorize - No new migration:
oauth_par_requeststable was already in V002 GET /oauth/authorizeextended to acceptrequest_uri(fully backward compatible with direct-param flow)
Changes#
db/oauth.rs—store_par_request,get_par_request,cleanup_expired_par_requestsroutes/oauth_par.rs— newPOST /oauth/parhandler (201 +{request_uri, expires_in: 60})routes/oauth_authorize.rs—resolve_authorize_params()resolves PAR or direct params before consent-page logicbruno/oauth_par.bru— seq 19
Test plan#
-
cargo test -p relaypasses (13 new tests) -
POST /oauth/parwith valid params → 201{request_uri: "urn:ietf:params:oauth:request_uri:...", expires_in: 60} -
POST /oauth/parwith unknown client → 400{error: "invalid_client"} -
GET /oauth/authorize?client_id=...&request_uri=urn:...→ renders consent page -
GET /oauth/authorize?...&request_uri=<expired>→ 400 error page -
GET /oauth/authorizewith direct params still works unchanged