Repository navigation
feat(oauth2): add RFC 9207 iss parameter, Redis refresh token persistence, and RFC 6750 form bearer support - #396
Conversation
…ence, and RFC 6750 form bearer support
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b00ebbf0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| // OIDC Core 5.3.1 + RFC 6750 2.2: allow form-encoded body | ||
| // access_token on POST /oauth2/userinfo (never URL query params). | ||
| token = req->getParameter("access_token"); |
There was a problem hiding this comment.
Read the form bearer token exclusively from the request body
For a POST request with a form content type, getParameter("access_token") also reads URL query parameters; the same merged-parameter behavior is explicitly documented in libs/drogon/src/services/SocialLoginGuard.cc in parseBody(). Consequently, this branch accepts /oauth2/userinfo?access_token=... even when the form body contains no token, contrary to its stated body-only restriction. Parse the body separately and add a POST-with-query-token rejection test. The built-in userinfo route is currently GET-only, so this affects the new filter branch when invoked directly or mounted on a POST route.
Useful? React with 👍 / 👎.
| "EXPIRE %s %s", | ||
| famKey.c_str(), | ||
| ttlStr.c_str() |
There was a problem hiding this comment.
Preserve the longest expiration when updating the family index
When a family contains tokens with different expiration times, saving a shorter-lived token unconditionally resets the shared family set's TTL to that token's TTL. For example, saving a token expiring in one hour after a sibling expiring tomorrow deletes the index after one hour while the sibling remains valid. Subsequent revokeTokenFamily() calls find no members and leave that refresh token usable. Update the index expiration atomically so it never precedes the latest expiration of any indexed token.
Useful? React with 👍 / 👎.
Summary
issparameter): Advertiseauthorization_response_iss_parameter_supported: truein discovery metadata and appendisson all authorize success/error/consent redirects.oauth2:family:<familyId>index tracking, revocation retention, family revocation, and introspection fallback inRedisTokenRepository. UpgradedTokenRepositoryContractTest.ccto round-trip contract.access_tokeninapplication/x-www-form-urlencodedbody forPOST /oauth2/userinfoinOAuth2AuthFilter(GET query token remains rejected). Route registration &openapi.yamlSDK regeneration deferred to a follow-up PR with Go 1.22+.Testing
tests/integration/token/RfcGapAFeaturesTest.cc(3 tests, 18 assertions).