Skip to content

Conversation

@melissaahn
Copy link
Contributor

@melissaahn melissaahn commented Oct 23, 2025

Summary:

In this PR, we:

  • Expose the WebApp APIs via BrokerMsalController. OneAuth is already using this class to call similar Edge APIs.
    • getSupportedWebAppContracts(String minBrokerProtocolVersion): this method is called by OneAuth to make sure that the broker can handle the request.
    • executeWebAppRequest(String Request, String minBrokerProtocolVersion): this method handles requests for GetToken, GetCookies, and SignOut.
  • Implement the bundle helper methods for creating the bundle and extracting the results from the result bundle.
  • Adds the bundle keys to AuthenticationConstants, where both common and broker can access them.

Related broker PR: https://github.com/AzureAD/ad-accounts-for-android/pull/3256

AB#3409879

@github-actions
Copy link

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

Click here to Learn more.

@melissaahn melissaahn requested a review from Copilot October 23, 2025 16:06
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 introduces support for WebApps APIs in the Edge Token Broker by adding two new broker operations: getSupportedWebAppContracts and executeWebAppRequest. These operations enable the broker to expose WebApps functionality through the existing broker protocol infrastructure.

Key Changes

  • Added new broker protocol constants for WebApps API communication (request/response/error keys)
  • Implemented two new broker operations in BrokerMsalController for getting supported contracts and executing web app requests
  • Added corresponding adapter methods for bundling requests and extracting results from broker responses

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
AuthenticationConstants.java Defines new broker protocol constants for WebApps API keys (contracts, request, response, error)
MsalBrokerRequestAdapter.java Adds methods to construct request bundles for getSupportedWebAppContracts and executeWebAppRequest operations
MsalBrokerResultAdapter.java Implements result extraction methods for WebApps operations with null-safety checks
BrokerMsalController.java Implements the two main WebApps broker operations following the existing broker operation pattern

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot changed the title Edge TB: Expose WebApps APIs Edge TB: Expose WebApps APIs, Fixes AB#3409879 Oct 23, 2025
@melissaahn melissaahn marked this pull request as ready for review October 23, 2025 21:48
@melissaahn melissaahn requested review from a team as code owners October 23, 2025 21:48
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