-
Notifications
You must be signed in to change notification settings - Fork 36
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
Organize browser selection classes and change signature for get AuthorizationStrategy, Fixes AB#3119409 #2564
base: dev
Are you sure you want to change the base?
Conversation
…/microsoft-authentication-library-common-for-android into pedroro/browser-selector
✅ Work item link check complete. Description contains link AB#3119409 to an Azure Boards work item. |
...main/java/com/microsoft/identity/common/internal/ui/AndroidAuthorizationStrategyFactory.java
Outdated
Show resolved
Hide resolved
.../java/com/microsoft/identity/common/internal/ui/CurrentTaskBrowserAuthorizationStrategy.java
Outdated
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/ui/browser/BrowserSelector.java
Outdated
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/ui/browser/BrowserSelector.java
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/ui/browser/BrowserSelector.java
Outdated
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/ui/browser/BrowserSelector.java
Outdated
Show resolved
Hide resolved
if (parameters.getAuthorizationAgent() == AuthorizationAgent.WEBVIEW) { | ||
Logger.info(methodTag, "Use webView for authorization."); | ||
// Use embedded webView if no browser available or authorization agent is webView | ||
if (authorizationAgent == AuthorizationAgent.WEBVIEW || browser == 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.
If someone passes authorization agent as BROWSER but passes null browser, then what strategy is picked?
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.
embedded web view authorization strategy
Add Javadoc:
- Get the authorization strategy based on the authorization agent and browser.
- If the authorization agent is WEBVIEW or the browser is null,
- return the embedded web view authorization strategy.
- Otherwise, return the browser authorization strategy.
@NonNull final AuthorizationAgent authorizationAgent, | ||
@Nullable final Browser browser, |
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.
If someone passes authorization agent as WEBVIEW but also a non-null browser then what does that mean? What strategy gets picked?
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.
embedded web view authorization strategy
Add Javadoc:
* Get the authorization strategy based on the authorization agent and browser.
* If the authorization agent is WEBVIEW or the browser is null,
* return the embedded web view authorization strategy.
* Otherwise, return the browser authorization strategy.
common4j/src/main/com/microsoft/identity/common/java/browser/IBrowserSelector.java
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/browser/NoopBrowserSelector.java
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/ui/BrowserDescriptor.java
Outdated
Show resolved
Hide resolved
@shahzaibj, it seems there is some confusion about the getAuthorizationStrategy method. I’ve rephrased my comment and included it as Javadoc. Does that address the issue, or were you suggesting a different approach? |
The changes here are the preparatory work for the DUNA feature. Splitting this PR from DUNA to simplify the review process.
AB#3119409