-
Notifications
You must be signed in to change notification settings - Fork 38
Use Broker Content Provider for number match, Fixes AB#3308440 #2699
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
Use Broker Content Provider for number match, Fixes AB#3308440 #2699
Conversation
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
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 introduces a Content Provider for number match storage and updates related modules and tests accordingly.
- Updated NumberMatchHelper to use a Content Provider instead of a static HashMap.
- Modified tests and Auth UX interfaces to work with the new storage mechanism.
- Added broker operation and constants for number match retrieval.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
common/src/test/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchHelperTest.kt | Updated tests to validate the new Content Provider-based storage for number match data. |
common/src/test/java/com/microsoft/identity/common/internal/broker/AuthUxJavaScriptInterfaceTest.kt | Modified test setup to include context injection for the updated Auth UX JavaScript interface. |
common/src/main/java/com/microsoft/identity/common/internal/ui/webview/AzureActiveDirectoryWebViewClient.java | Updated to pass the application context when attaching the Auth UX JavaScript interface. |
common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchHelper.kt | Replaced static map usage with Content Provider interactions for storing and retrieving number match values. |
common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchDbHelper.kt | New SQLiteOpenHelper implementation to support the number match Content Provider. |
common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchContentProvider.kt | New Content Provider implementation managing number match data persistence. |
common/src/main/java/com/microsoft/identity/common/internal/broker/ipc/BrokerOperationBundle.java | Added new broker operation for retrieving number match information. |
common/src/main/java/com/microsoft/identity/common/internal/broker/AuthUxJavaScriptInterface.kt | Modified the constructor to require a context and updated the number match storage call accordingly. |
common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationConstants.java | Added new constants for the number match result and API path. |
...c/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchContentProvider.kt
Outdated
Show resolved
Hide resolved
✅ Work item link check complete. Description contains link AB#3308440 to an Azure Boards work item. |
common/src/main/java/com/microsoft/identity/common/internal/numberMatch/NumberMatchHelper.kt
Show resolved
Hide resolved
@@ -127,6 +130,9 @@ class AuthUxJavaScriptInterface { | |||
} | |||
|
|||
val operation = parameters.operation | |||
if (operation != null) { |
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.
In what cases would this be null?
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.
I will let @fadidurah answer since it is a part of his changes.
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.
As part of the AuthUx platform agnostic JS API discussion, operation
is not a mandatory field at this time, future usages of this interface may not have this field, and may only rely on action_name
and action_component
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.
LGTM
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.
[AB#3308440](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3308440) This PR adds constants used by AADAuthenticator module for number match scenarios. --------- Co-authored-by: fadidurah <[email protected]>
[AB#3308440](https://identitydivision.visualstudio.com/fac9d424-53d2-45c0-91b5-ef6ba7a6bf26/_workitems/edit/3308440) This PR adds constants used by AADAuthenticator module for number match scenarios. --------- Co-authored-by: fadidurah <[email protected]>
AB#3308440
This PR adds constants used by AADAuthenticator module for number match scenarios.