Skip to content

[APIP] Populate TokenId from BasicAuth#207

Merged
DDH13 merged 2 commits into
wso2:mainfrom
DDH13:main.basic-auth
Jun 17, 2026
Merged

[APIP] Populate TokenId from BasicAuth#207
DDH13 merged 2 commits into
wso2:mainfrom
DDH13:main.basic-auth

Conversation

@DDH13

@DDH13 DDH13 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Related to wso2/api-platform#2131

We use the given username as the tokenId

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@DDH13, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 38 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29db2296-e0a0-4473-a6e6-5f1670133b1b

📥 Commits

Reviewing files that changed from the base of the PR and between acad24b and 34bf92c.

📒 Files selected for processing (1)
  • policies/basic-auth/policy-definition.yaml
📝 Walkthrough

Walkthrough

The Basic Auth policy handler now sets TokenId on the policy.AuthContext struct to the authenticated username when processing a successful authentication. No other authentication logic, failure handling, or response behavior is changed. Additionally, the go.mod for the basic-auth module bumps the Go toolchain directive from 1.26.1 to 1.26.2 and updates the github.com/wso2/api-platform/sdk/core dependency from v0.2.4 to v0.2.14.

Suggested Reviewers

  • pubudu538
  • malinthaprasan
  • Krishanx92
  • renuka-fernando
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is minimal but substantive. It references the related issue and explains the implementation approach (using username as tokenId), though it lacks most template sections. Expand the description to include key template sections such as Purpose, Goals, Approach, and test coverage details to provide reviewers with complete context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly describes the main change: populating TokenId from BasicAuth credentials.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@policies/basic-auth/go.mod`:
- Line 5: The v0.2.14 upgrade of github.com/wso2/api-platform/sdk/core
introduces breaking changes including new `ProcessingMode` requirements and
interface refactoring. While the basic-auth policy appears correctly updated
with the Mode() method and TokenId usage, verify that all related policies in
this cohort (jwt-auth, api-key-auth, and any others using the core SDK) have
identical updates to their interface implementations. Ensure each policy
implements the Mode() method, uses TokenId correctly, follows the new interface
structure, and uses the standardized import paths consistent with v0.2.14,
matching the pattern already established in the basic-auth policy
implementation.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2f9ae755-4c40-4282-ae6e-c6557ce49ff5

📥 Commits

Reviewing files that changed from the base of the PR and between 00fb0da and acad24b.

⛔ Files ignored due to path filters (1)
  • policies/basic-auth/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • policies/basic-auth/basicauth.go
  • policies/basic-auth/go.mod

Comment thread policies/basic-auth/go.mod
@DDH13 DDH13 merged commit e5c126d into wso2:main Jun 17, 2026
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.

2 participants