feat(oidc): add post route for /userinfo#767
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a POST route for Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant ContextMiddleware
participant Controller as UserinfoHandler
Client->>Router: POST /api/oidc/userinfo
Router->>ContextMiddleware: dispatch request
ContextMiddleware-->>Router: c.Next() (path in skip list)
Router->>UserinfoHandler: invoke Userinfo
UserinfoHandler-->>Client: 200 / userinfo response
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #767 +/- ##
==========================================
+ Coverage 19.12% 19.14% +0.02%
==========================================
Files 50 50
Lines 3917 3918 +1
==========================================
+ Hits 749 750 +1
Misses 3095 3095
Partials 73 73 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/controller/oidc_controller.go`:
- Line 73: The POST route oidcGroup.POST("/userinfo", controller.Userinfo) is
not covered by the skip list in the context middleware, so add a matching skip
entry for the POST method and path "/api/oidc/userinfo" in the middleware's skip
configuration (the skip list handling in context_middleware.go that currently
only contains "GET /api/oidc/userinfo"), ensuring the middleware treats POST
/api/oidc/userinfo the same as the GET entry so controller.Userinfo is reached
without being blocked.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 985d55d4-2923-433f-a1fa-076bb2bc8d09
📒 Files selected for processing (1)
internal/controller/oidc_controller.go
easy one-liner to pass `oidcc-userinfo-post-header` test in conformance suite.
92d9491 to
5aab740
Compare
|
correction: this is now two lines instead of one... |
easy one-liner to pass
oidcc-userinfo-post-headertest in conformance suite.Before:
After:
Summary by CodeRabbit