-
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
DUNA flow: Resume Auth , Fixes AB#3079802 #2557
base: dev
Are you sure you want to change the base?
Conversation
…D/microsoft-authentication-library-common-for-android into pedroro/switch-to-browser
❌ 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#3079802 to an Azure Boards work item. |
❌ Work item link check failed. Description contains AB#3079802 Click here to learn more. |
...va/com/microsoft/identity/common/internal/providers/oauth2/AuthorizationActivityFactory.java
Show resolved
Hide resolved
final boolean containsCode = extras.containsKey( | ||
AuthenticationConstants.SWITCH_BROWSER.CODE | ||
); | ||
return containsCode && containsActionUri; |
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.
Should we also check if the existing state of the authorization is it is waiting for resuming switch browser flow? You may want store some state what you can validate here.
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.
Done 6f82f9d
/** | ||
* String Query parameter key to indicate support for SWITCH_BROWSER protocol. | ||
*/ | ||
public static final String PATH = "switch_browser"; | ||
public static final String CLAIM = "switch_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.
Why is this called CLAIM now?
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.
The previous constant called PATH was renamed to START_PATH (switch_browser) to differentiate it from RESUME_PATH (switch_browser_resume). The claim is the QP that indicates the client supports DUNA. Actually, I will rename it to CLIENT_SUPPORTS_FLOW.
This PR addresses step 16 of the Switch browser flow
BrokerBrowserRedirectActivity will re-start the WebViewAuthorizationFragment so we update the intent data and handle the activity being resumed on WebViewAuthorizationFragment.onResume
The switch browser resume endpoint requires the client ID, so we need to pass this value at the moment we start the WebAuthorizaFragment.
Refactor AuthorizationActivityFactory to work with one data parameter to create the auth intent.
AB#3079802