Skip to content

Conversation

@melissaahn
Copy link
Contributor

@melissaahn melissaahn commented Dec 3, 2025

Summary

AB#3435741

The getToken request of the webapps API requires that pairs coming in the extraParameters field will need to be sent for interactive and silent requests. We'll need to send these parameters:

  • Through extra query parameters for interactive
  • Through the form request body for the token endpoint for both interactive and silent.

This PR addresses the second point by creating the extraTokenBodyParameter field, which will be parameters added to the body of the token requests.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@github-actions github-actions bot changed the title ExtraTokenBodyParameters ExtraTokenBodyParameters, Fixes AB#3435741 Dec 3, 2025
@melissaahn melissaahn requested a review from Copilot December 3, 2025 00:18
Copilot finished reviewing on behalf of melissaahn December 3, 2025 00:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for extraTokenBodyParameters, enabling additional string/string parameter pairs to be included in OAuth2 token request bodies for both interactive and silent token acquisition flows.

  • Creates a new interface IHasExtraTokenBodyParameters to define the contract for classes carrying extra token body parameters
  • Implements the interface in InteractiveTokenCommandParameters and BrokerSilentTokenCommandParameters classes
  • Updates MsalBrokerRequestAdapter to serialize these parameters and pass them to BrokerRequest
  • Extends the IPC schema in BrokerRequest with a new EXTRA_TOKEN_BODY_PARAMETER field

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
IHasExtraTokenBodyParameters.java New interface defining the contract for retrieving extra token body parameters; contains a spelling error in documentation
InteractiveTokenCommandParameters.java Implements IHasExtraTokenBodyParameters and adds extraTokenBodyParameters field; missing defensive copy getter
BrokerSilentTokenCommandParameters.java Implements IHasExtraTokenBodyParameters and adds extraTokenBodyParameters field; missing defensive copy getter
MsalBrokerRequestAdapter.java Updates both interactive and silent request methods to serialize and include extra token body parameters; contains code duplication and lacks test coverage
BrokerRequest.java Adds new serialized field mExtraTokenBodyParameter to support IPC transmission of these parameters

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