Skip to content

Common changes for Resource Account #2684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 2, 2025
Merged

Common changes for Resource Account #2684

merged 15 commits into from
Jul 2, 2025

Conversation

mohitc1
Copy link
Contributor

@mohitc1 mohitc1 commented Jun 24, 2025

@mohitc1 mohitc1 added No-Changelog This Pull-Request has no associated changelog entry. Skip-Consumers-Check Only include this if making a breaking change purposefully, and there is an MSAL/ADAL/Broker PR skip AB ID validation labels Jun 24, 2025
@mohitc1 mohitc1 marked this pull request as ready for review June 24, 2025 17:49
@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 17:49
@mohitc1 mohitc1 requested a review from a team as a code owner June 24, 2025 17:49
Copy link
Contributor

@Copilot 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 changes related to handling Resource Account scenarios by updating exception handling, adding new constants, and enhancing test coverage.

  • Adds new tests in ExceptionAdapterTests for resource account and MFA exception handling.
  • Introduces a new RESOURCE_ACCOUNT grant type in TokenRequest and a corresponding public API constant.
  • Adds a flag to BrokerSilentTokenCommandParameters to distinguish resource account requests and updates ExceptionAdapter logic accordingly.

Reviewed Changes

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

Show a summary per file
File Description
common4j/src/test/com/microsoft/identity/common/java/controllers/ExceptionAdapterTests.java Updated tests with static assertions and added cases for resource account handling.
common4j/src/main/com/microsoft/identity/common/java/providers/oauth2/TokenRequest.java Added new grant type constant RESOURCE_ACCOUNT.
common4j/src/main/com/microsoft/identity/common/java/eststelemetry/PublicApiId.java Introduced new constant for broker resource account API.
common4j/src/main/com/microsoft/identity/common/java/controllers/ExceptionAdapter.java Modified exception resolution logic to consider resource account and broker parameters.
common4j/src/main/com/microsoft/identity/common/java/commands/parameters/BrokerSilentTokenCommandParameters.java Added a new field to indicate resource account token requests.

// THE SOFTWARE.
package com.microsoft.identity.common.java.jwt

object JwtKeyUseTypes {
Copy link
Member

Choose a reason for hiding this comment

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

nit: comment/ context on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me fix that in next common PR.

@mohitc1 mohitc1 merged commit 225664c into dev Jul 2, 2025
19 of 20 checks passed
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. skip AB ID validation 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.

3 participants