Skip to content

Update Json Schema, put JavaScript API behind a flight, Fixes AB#3203956, Closed AB#3203956#2653

Merged
fadidurah merged 6 commits intodevfrom
fadi/numberMatchFlight
May 30, 2025
Merged

Update Json Schema, put JavaScript API behind a flight, Fixes AB#3203956, Closed AB#3203956#2653
fadidurah merged 6 commits intodevfrom
fadi/numberMatchFlight

Conversation

@fadidurah
Copy link
Copy Markdown
Contributor

@fadidurah fadidurah commented May 29, 2025

Minor change was made to the json schema, updated our code to match. Also put JavaScript API behind a flight.

New schema:
{
"correlationID": "$UUID"
  "action_name":"write_data",
"action_component":"broker",
  "params": 
{ 
"operation": "number_matching",
"sessionID": "$sessionID",
"code_match": "$number"
} 
 } 

Original numberMatch PR: #2617

AB#3203956

Copilot AI review requested due to automatic review settings May 29, 2025 16:53
@fadidurah fadidurah requested a review from a team as a code owner May 29, 2025 16:53
@fadidurah fadidurah added the No-Changelog This Pull-Request has no associated changelog entry. label May 29, 2025
@github-actions
Copy link
Copy Markdown

✅ Work item link check complete. Description contains link AB#3203956 to an Azure Boards work item.

@github-actions
Copy link
Copy Markdown

❌ Work item link check failed. Description contains AB#3203956 but the Bot could not link it to an Azure Boards work item.

Click here to learn more.

@github-actions github-actions Bot changed the title Put JavaScript API behind a flight Put JavaScript API behind a flight, Fixes AB#3203956 May 29, 2025
Copy link
Copy Markdown
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 a new flight flag to gate the JavaScript API for AuthUx and updates the WebView client to respect that flag.

  • Adds ENABLE_JS_API_FOR_AUTHUX to CommonFlight
  • Gates AuthUxJavaScriptInterface exposure behind the new flight in AzureActiveDirectoryWebViewClient
  • Removes now-unused import in WebViewAuthorizationFragment

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
common4j/.../CommonFlight.java Added new flight constant (with a trailing comma typo)
common/.../ui/webview/AzureActiveDirectoryWebViewClient.java Wrapped JS API injection in a flight-enabled check
common/.../oauth2/WebViewAuthorizationFragment.java Removed unused AuthUxJavaScriptInterface import
Comments suppressed due to low confidence (2)

common/src/main/java/com/microsoft/identity/common/internal/providers/oauth2/WebViewAuthorizationFragment.java:51

  • Good catch removing the unused import. Confirm there are no remaining references to AuthUxJavaScriptInterface in this class.
import com.microsoft.identity.common.internal.broker.AuthUxJavaScriptInterface;

common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java:122

  • There's an extra comma before the semicolon on the last enum constant. Remove the trailing comma so it reads ..., true);.
ENABLE_JS_API_FOR_AUTHUX("EnableJsApiForAuthUx", true),;

@fadidurah fadidurah changed the title Put JavaScript API behind a flight, Fixes AB#3203956 Update Json Schema, put JavaScript API behind a flight, Fixes AB#3203956 May 29, 2025
@github-actions github-actions Bot changed the title Update Json Schema, put JavaScript API behind a flight, Fixes AB#3203956 Update Json Schema, put JavaScript API behind a flight, Fixes AB#3203956, Closed AB#3203956 May 29, 2025
@fadidurah fadidurah merged commit dec8a27 into dev May 30, 2025
24 of 25 checks passed
@fadidurah fadidurah deleted the fadi/numberMatchFlight branch June 16, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-Changelog This Pull-Request has no associated changelog entry.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants