Skip to content

Conversation

russelmrcl
Copy link
Collaborator

@russelmrcl russelmrcl commented Oct 10, 2025

Summary by CodeRabbit

  • Refactor
    • Standardized naming for OAuth2 client authorization methods to uppercase for consistency across the app and logs. No functional behavior changes expected.
  • Tests
    • Updated tests to align with the standardized authorization method names.

Note: If you reference these authorization methods in custom integrations or scripts, ensure names use uppercase to match the new convention.

@russelmrcl russelmrcl requested a review from rrayst October 10, 2025 09:19
Copy link
Contributor

coderabbitai bot commented Oct 10, 2025

Walkthrough

Renamed ClientAuthorization enum constants from lowercase to uppercase and updated all usages. Adjusted AuthorizationService to use the new enum names and cleaned up unused imports. Updated a test (B2CMembrane) to the new constant. No functional logic changes beyond identifier updates.

Changes

Cohort / File(s) Summary
Enum constants rename
core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/ClientAuthorization.java
Renamed enum constants: client_secret_basicCLIENT_SECRET_BASIC, client_secret_postCLIENT_SECRET_POST.
Service updates to new enum names and imports cleanup
core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/AuthorizationService.java
Switched default field initialization and comparisons to CLIENT_SECRET_BASIC; removed unused imports (e.g., Base64/URLEncoder related).
Test alignment with enum rename
core/src/test/java/com/predic8/membrane/core/interceptor/oauth2/client/b2c/B2CMembrane.java
Updated usage to CLIENT_SECRET_POST.

Sequence Diagram(s)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • OAuth2 improvements #2091 — Also modifies OAuth2 components and likely touches the same ClientAuthorization enum and use sites.

Suggested reviewers

  • predic8
  • christiangoerdes

Poem

A bunny flips the case, hop-hop, so neat,
From gentle lowercase to UPPER it’s complete.
Enums stand tall, tests tip their hat,
Service nods “BASIC” — and that is that.
Carrot-shaped commits, crisp and tight,
Merge burrow ready, all green lights. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly and accurately describes the core change of converting the enum values in ClientAuthorization to uppercase, directly reflecting the main refactoring performed in the pull request.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch client-auth

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75679a8 and eff5159.

📒 Files selected for processing (3)
  • core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/AuthorizationService.java (2 hunks)
  • core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/ClientAuthorization.java (1 hunks)
  • core/src/test/java/com/predic8/membrane/core/interceptor/oauth2/client/b2c/B2CMembrane.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (java)
🔇 Additional comments (4)
core/src/test/java/com/predic8/membrane/core/interceptor/oauth2/client/b2c/B2CMembrane.java (1)

162-162: LGTM!

The enum constant reference has been correctly updated to use the uppercase naming convention.

core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/AuthorizationService.java (2)

78-78: LGTM!

The default value has been correctly updated to use the uppercase enum constant.


258-258: LGTM!

The enum constant comparison has been correctly updated to use the uppercase naming convention.

core/src/main/java/com/predic8/membrane/core/interceptor/oauth2/authorizationservice/ClientAuthorization.java (1)

23-25: Confirm enum renaming won’t break backward compatibility.

The renames follow Java conventions and no Jackson/XML annotations or old-value references were detected in the codebase. Please manually verify any external configurations (XML, JSON, YAML, .properties, etc.) for references to the old enum names to avoid breaking existing deployments.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@membrane-ci-server
Copy link

This pull request needs "/ok-to-test" from an authorized committer.

@rrayst rrayst merged commit 6ebfcf2 into master Oct 10, 2025
4 of 5 checks passed
@rrayst rrayst deleted the client-auth branch October 10, 2025 09:26
@coderabbitai coderabbitai bot mentioned this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants