Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis pull request makes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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. ❌ Your project status has failed because the head coverage (38.09%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #326 +/- ##
============================================
+ Coverage 38.05% 38.09% +0.03%
- Complexity 1259 1261 +2
============================================
Files 198 198
Lines 7646 7645 -1
Branches 885 885
============================================
+ Hits 2910 2912 +2
+ Misses 4598 4595 -3
Partials 138 138 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rhamzeh
left a comment
There was a problem hiding this comment.
We generally use abc.fga.example for all URLs
- Consistent
- We're sure it will never resolve
Co-authored-by: Raghd Hamzeh <raghd@rhamzeh.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
README.md (1)
211-213: Clarify optionality in the first client-credentials sample.
Line 225documentsapiAudienceas optional, butLine 212in the first example reads as required. Consider adding an inline “optional” note there to avoid mixed signals across sections.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@README.md` around lines 211 - 213, The first client-credentials example shows .apiAudience(...) inline without indicating it's optional; update that sample to mark apiAudience as optional (e.g., append " (optional)" to the .apiAudience call or its comment) so it matches the later documentation that apiAudience is optional and avoids conflicting signals—ensure the change is applied to the example lines containing .apiTokenIssuer, .apiAudience, and .clientId.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@README.md`:
- Around line 211-213: The first client-credentials example shows
.apiAudience(...) inline without indicating it's optional; update that sample to
mark apiAudience as optional (e.g., append " (optional)" to the .apiAudience
call or its comment) so it matches the later documentation that apiAudience is
optional and avoids conflicting signals—ensure the change is applied to the
example lines containing .apiTokenIssuer, .apiAudience, and .clientId.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3992b200-a74f-4f2a-bfc3-38aea84f33c2
📒 Files selected for processing (3)
README.mdsrc/main/java/dev/openfga/sdk/api/configuration/ClientCredentials.javasrc/test/java/dev/openfga/sdk/api/configuration/ClientCredentialsTest.java
💤 Files with no reviewable changes (1)
- src/main/java/dev/openfga/sdk/api/configuration/ClientCredentials.java
There was a problem hiding this comment.
Pull request overview
Adds support/documentation for OAuth2 client-credentials scopes and relaxes validation to allow OAuth2 providers where audience is optional, aligning SDK configuration with standard OAuth2 behavior.
Changes:
- Make
apiAudienceoptional inClientCredentials.assertValid(). - Add tests covering missing
apiAudienceand providingscopes. - Update README OAuth2 client-credentials documentation and examples (including clarifying
apiTokenIssuer).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/main/java/dev/openfga/sdk/api/configuration/ClientCredentials.java | Removes required validation for apiAudience during client-credentials validation. |
| src/test/java/dev/openfga/sdk/api/configuration/ClientCredentialsTest.java | Adds test cases for optional apiAudience and for setting scopes. |
| README.md | Updates OAuth2 client-credentials section and examples, including issuer/scopes guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
Documentation
apiAudienceandscopesare optional parameters whileapiTokenIssuermust be the full token endpoint URL.Changes
apiAudienceoptional.