AzureAD / microsoft-authentication-library-common-for-android

Common code used by both the Active Directory Authentication Library (ADAL) and the Microsoft Authentication Library (MSAL)
MIT License
41 stars 35 forks source link

Add passkey protocol header #2181

Closed melissaahn closed 1 year ago

melissaahn commented 1 year ago

Summary

To enable the passkey protocol, we need to send a specific header (x-ms-PassKeyAuth) to the server. We only want to enable the protocol for WebView, so conditionals check that before adding the header. The protocol only applies to interactive auth scenarios, so it isn't going to be added in any silent auth requests. Also, since the protocol and the feature as a whole is not ready yet, the logic is blocked behind a boolean flag for now. Once the protocol is ready for testing, I'll reevaluate and make sure that the header is being added to all places needed and is working as expected.

Testing

Enabled the passkey protocol by setting the constant to true and tested with msalTestApp. Put breakpoints at the loadUrl call to make sure that the passkey header was present. Tested with aad cloud account and msa account (set authorization agent to "WEBVIEW" in msal_config.msa; saw that passkey header was included in the forwarding method created for msa). Tested that the results were the same with brokered auth as well.

melissaahn commented 1 year ago

Added SkipConsumers check label due to some errors occurring in the Linux Broker assemble consumers task which are unrelated to this PR. All the other assemble consumer tasks passed,