Skip to content

Conversation

@mohitc1
Copy link
Contributor

@mohitc1 mohitc1 commented Jan 21, 2025

Fixes AB#3100603
The PR adds to allow passing google id token credential from app side (in OneAuth) to Android Broker via Android Common.

OneAuth can get the id token by using Sign In With Google component added earlier and pass it to Android Broker via BrokerRequest object.

Changes include:

  1. Make SignInWithGoogleCredential object serializable to allow passing the object from app side to broker as part of BrokerRequest.
  2. Locally the reference to object can be maintained in Android AndroidInteractiveTokenCommandParameters which is renamed from AndroidActivityInteractiveTokenCommandParameters to be more flexible to accommodate more fields.
  3. On Broker received, BrokerRequest is deserialized. If it has google credentials, it will be attached in BrokerInteractiveTokenCommandParameters as headers (x-ms-fidp-token: ) and extra query parameters (id_provder=google.com). Refer Broker PR.
  4. Updated latest broker version to 17. OneAuth should call broker for sign in with google flow only if the broker version supports this version. OneAuth does broker version check early in deciding if support broker is present or not.
  5. Added Unit tests.

Related PRs:
Broker: https://github.com/AzureAD/ad-accounts-for-android/pull/3038
MSAL: AzureAD/microsoft-authentication-library-for-android#2247

@github-actions
Copy link

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

Click here to Learn more.

@github-actions
Copy link

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

@github-actions
Copy link

❌ Work item link check failed. Description contains AB#3100603 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 Siwg Broker support Siwg Broker support, Fixes AB#3100603 Jan 21, 2025
@mohitc1 mohitc1 changed the title Siwg Broker support, Fixes AB#3100603 [SIWG] Pass siwg credential to broker, Fixes AB#3100603 Jan 27, 2025
@mohitc1 mohitc1 marked this pull request as ready for review January 27, 2025 17:08
@mohitc1 mohitc1 requested a review from a team as a code owner January 27, 2025 17:08
@mohitc1 mohitc1 changed the title [SIWG] Pass siwg credential to broker, Fixes AB#3100603 [SIWG] Pass Sign In With Google credential to broker, Fixes AB#3100603 Jan 27, 2025
/**
* The newest Msal-To-Broker protocol version.
*
* @see <a href="https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview?path=/%5BAndroid%5D%20Broker%20API/broker_protocol_versions.md">Android Auth Broker Protocol Versions</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Once you merge the PR, could you also update the version in the link above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes.

@mohitc1 mohitc1 added the Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR label Jan 28, 2025
@mohitc1 mohitc1 merged commit b1e33fb into dev Jan 29, 2025
24 of 25 checks passed
mohitc1 added a commit to AzureAD/microsoft-authentication-library-for-android that referenced this pull request Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants