Skip to content

Add methods for self-service API#305

Merged
hwupathum merged 1 commit into
wso2:masterfrom
hwupathum:consent-me-api
Jul 5, 2026
Merged

Add methods for self-service API#305
hwupathum merged 1 commit into
wso2:masterfrom
hwupathum:consent-me-api

Conversation

@hwupathum

Copy link
Copy Markdown
Contributor

This pull request refactors the consent validation and authorization logic in the UserConsentService class to delegate user validation directly to the ConsentManager layer, and updates the dependency version for the consent management module. The main changes simplify the service layer by removing redundant validation code and ensuring that user-specific operations are handled at the manager level.

Key changes:

Refactoring validation and authorization logic:

  • Updated calls to consentManager.getReceiptWithExtendedSchema and related methods to include the subjectId parameter, allowing the manager to handle user validation directly instead of performing ownership and authorization checks in the service layer.
  • Removed the validateOwnership, validateAuthorizer, and related helper methods from UserConsentService, streamlining the code and reducing duplication of validation logic.

Dependency update:

  • Bumped the carbon.consent.mgt.version property in pom.xml from 2.9.10 to 2.9.14 to align with the new validation approach and ensure compatibility.

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@hwupathum, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ee7faac6-447f-46f6-9a2a-cfadb44dd7f4

📥 Commits

Reviewing files that changed from the base of the PR and between 5550248 and c1ce98a.

📒 Files selected for processing (2)
  • components/org.wso2.carbon.identity.api.user.consent/org.wso2.carbon.identity.api.user.consent.v1/src/main/java/org/wso2/carbon/identity/api/user/consent/v1/impl/core/UserConsentService.java
  • pom.xml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@jenkins-is-staging

Copy link
Copy Markdown

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/28735471930

@jenkins-is-staging

Copy link
Copy Markdown

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/28735471930
Status: failure

@hwupathum hwupathum merged commit efffa47 into wso2:master Jul 5, 2026
3 of 4 checks passed
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.

3 participants