Skip to content

Add Token Exchange grant type to agent application template#10183

Open
ranuka-laksika wants to merge 2 commits intowso2:masterfrom
ranuka-laksika:add-token-exchange-grant-type
Open

Add Token Exchange grant type to agent application template#10183
ranuka-laksika wants to merge 2 commits intowso2:masterfrom
ranuka-laksika:add-token-exchange-grant-type

Conversation

@ranuka-laksika
Copy link
Copy Markdown
Contributor

@ranuka-laksika ranuka-laksika commented Apr 23, 2026

Summary

This PR enhances the agent application template and creation flow with two key
improvements:

Token Exchange Grant Type Support - Agent applications now include the Token Exchange grant type (urn:ietf:params:oauth:grant-type:token-exchange) by default

Changes

Token Exchange Grant Type

Files Modified:

  • features/admin.extensions.v1/application-templates/templates/agent-application/agent-application.json
  • features/admin.extensions.v1/configs/application.tsx

What Changed:

  • Added urn:ietf:params:oauth:grant-type:token-exchange to the default grant types in the agent application template
  • Updated the allowed grant types configuration to display Token Exchange as a selectable option in the UI
  • Agent applications now support token exchange grant type

Grant Types for Agent Applications:

  • Authorization Code
  • Refresh Token
  • CIBA
  • Token Exchange (newly added)

Issue:- wso2/product-is#27653

image

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

The agent-application template's OAuth2 OIDC configuration is extended to support the token-exchange grant type. Corresponding TypeScript configuration is updated to include the token-exchange grant in the allowed grant types.

Changes

Cohort / File(s) Summary
Agent Application OAuth2 Configuration
features/admin.extensions.v1/application-templates/templates/agent-application/agent-application.json, features/admin.extensions.v1/configs/application.tsx
Added urn:ietf:params:oauth:grant-type:token-exchange (ApplicationManagementConstants.OAUTH2_TOKEN_EXCHANGE) to the agent-application OIDC grantTypes list; existing grants retained.
Changeset
.changeset/tender-dolls-hang.md
Added a changeset entry documenting the patch bump and noting token-exchange grant support for the agent application template.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
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.
Changeset Required ✅ Passed Pull request includes valid changeset file documenting version updates for packages with clear description of Token Exchange grant type addition.
Description check ✅ Passed The PR description is well-structured with clear purpose, specific files modified, detailed change explanations, and relevant issue reference, though some checklist items are incomplete.
Title check ✅ Passed The title clearly and specifically describes the main change: adding Token Exchange grant type support to the agent application template, which aligns with all file modifications in the changeset.

✏️ 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.05%. Comparing base (4e29055) to head (0098b03).
⚠️ Report is 491 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10183   +/-   ##
=======================================
  Coverage   56.05%   56.05%           
=======================================
  Files          42       42           
  Lines        1024     1024           
  Branches      254      246    -8     
=======================================
  Hits          574      574           
  Misses        416      416           
  Partials       34       34           
Flag Coverage Δ
@wso2is/core 56.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pavinduLakshan
Copy link
Copy Markdown
Member

Let's add token exchange grant to mcp client application template too. cc: @ayshsandu

@ranuka-laksika ranuka-laksika changed the title Add Token Exchange grant type to agent application template [Master]Add Token Exchange grant type to agent application template Apr 24, 2026
@ranuka-laksika ranuka-laksika changed the title [Master]Add Token Exchange grant type to agent application template Add Token Exchange grant type to agent application template Apr 24, 2026
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