-
Notifications
You must be signed in to change notification settings - Fork 36
Resource Account API only, Fixes AB#3230428 #2640
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
base: dev
Are you sure you want to change the base?
Conversation
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
✅ Work item link check complete. Description contains link AB#3230428 to an Azure Boards work item. |
common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerRequest.java
Outdated
Show resolved
Hide resolved
...com/microsoft/identity/common/java/commands/parameters/ResourceAccountCommandParameters.java
Outdated
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/result/MsalBrokerResultAdapter.java
Show resolved
Hide resolved
There was a problem hiding this 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 provisioning resource accounts via the broker by introducing new command parameter classes, updating the MSAL request and result adaptors, and adding corresponding tests.
- Introduces ResourceAccountCommandParameters and BrokerResourceAccountCommandParameters to encapsulate the new resource account parameters.
- Updates request and result adapters (MsalBrokerRequestAdapter and MsalBrokerResultAdapter) with methods to build and extract resource account bundles.
- Adds new tests and extends the BrokerMsalController to support resource account provisioning.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
common4j/src/main/com/microsoft/identity/common/java/commands/parameters/ResourceAccountCommandParameters.java | New parameter class for resource account provisioning. |
common4j/src/main/com/microsoft/identity/common/java/commands/parameters/BrokerResourceAccountCommandParameters.java | Extends resource account parameters with broker-specific fields. |
common/src/test/java/com/microsoft/identity/common/internal/request/MsalBrokerResultAdapterTests.kt | Tests for resource account record extraction from a bundle. |
common/src/test/java/com/microsoft/identity/common/internal/request/MsalBrokerRequestAdapterTests.java | Test verifying request bundle construction for provisioning a resource account. |
common/src/test/java/com/microsoft/identity/common/internal/controllers/BrokerMsalControllerTest.java | Test to simulate a resource account provisioning operation. |
common/src/main/java/com/microsoft/identity/common/internal/result/MsalBrokerResultAdapter.java | Added resourceAccountRecordFromBundle method to extract a single cache record. |
common/src/main/java/com/microsoft/identity/common/internal/request/MsalBrokerRequestAdapter.java | Added getRequestBundleForProvisionResourceAccount method for resource account requests. |
common/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java | Implements provisionResourceAccount and integrates resource account handling. |
common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/BrokerOperationBundle.java | Adds new operation enum entry for resource account provisioning. |
common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerRequest.java | Removes the @nonnull mScope annotation to align with resource account API needs. |
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java | Introduces API paths for the new resource account provisioning endpoint. |
changelog.txt | Documents the new resource account provisioning API. |
Comments suppressed due to low confidence (1)
common/src/main/java/com/microsoft/identity/common/internal/broker/BrokerRequest.java:96
- The removal of the @nonnull annotation for mScope may allow null values in scenarios where the scope is expected. Please confirm that this change is intentional and that dependent request types are not adversely affected.
@NonNull
...n/src/main/java/com/microsoft/identity/common/internal/request/MsalBrokerRequestAdapter.java
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responded to few comments, else lgtm
Fixes AB#3230428
Adding method for provisioning resource account in Android Broker. The method is exposed to OneAuth via BrokerMsalController
For details Refer: https://github.com/AzureAD/ad-accounts-for-android/pull/3093