Skip to content

Commit

Permalink
Removing Passkey feature flag (#2044)
Browse files Browse the repository at this point in the history
### Summary
See
AzureAD/microsoft-authentication-library-common-for-android#2329.
Since MSAL is going to be flighted by the consumers, we'll remove the
feature flag in general from MSAL.
  • Loading branch information
melissaahn committed Mar 1, 2024
1 parent 29549c3 commit 2d74f93
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vNext
----------
- [MINOR] Rename "is QR + PIN available" API to "get preferred auth method". (#2012)
- [MINOR] Add support for CIAM custom domain (#2029)
- [MINOR] Removing passkey feature flag (#2044)

Version 5.1.0
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,9 +1188,7 @@ public static GenerateShrCommandParameters createGenerateShrCommandParameters(
public static List<Map.Entry<String, String>> appendToExtraQueryParametersIfWebAuthnCapable(
@Nullable final List<Map.Entry<String, String>> queryStringParameters,
@NonNull final PublicClientApplicationConfiguration configuration) {
//Putting behind passkey feature flag until feature is ready.
if (FidoConstants.IS_PASSKEY_SUPPORT_READY
&& configuration.isWebauthnCapable()) {
if (configuration.isWebauthnCapable()) {
final Map.Entry<String, String> webauthnExtraParameter = new AbstractMap.SimpleEntry<>(
FidoConstants.WEBAUTHN_QUERY_PARAMETER_FIELD,
FidoConstants.WEBAUTHN_QUERY_PARAMETER_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
import com.microsoft.identity.common.java.ui.PreferredAuthMethod;

import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
Expand Down Expand Up @@ -205,7 +203,6 @@ public void testDeviceCodeFlowOperationWithoutClaims() throws ClientException {

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_UnsetPropertyAndNullInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
null,
getConfiguration(AAD_NONE_CONFIG_FILE)
Expand All @@ -215,7 +212,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_UnsetPropertyAndNu

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_UnsetPropertyAndNonNullInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = new ArrayList<>();
queryParameters.add(new AbstractMap.SimpleEntry<>("field1", "property1"));
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
Expand All @@ -228,7 +224,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_UnsetPropertyAndNo

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndNullInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
null,
getConfiguration(WEBAUTHN_CAPABLE_CONFIG_FILE)
Expand All @@ -239,7 +234,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndNull

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndNonNullInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = new ArrayList<>();
queryParameters.add(new AbstractMap.SimpleEntry<>("field1", "property1"));
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
Expand All @@ -252,7 +246,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndNonN

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndParameterAlreadyPresent() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = new ArrayList<>();
queryParameters.add(new AbstractMap.SimpleEntry<>(FidoConstants.WEBAUTHN_QUERY_PARAMETER_FIELD, FidoConstants.WEBAUTHN_QUERY_PARAMETER_VALUE));
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
Expand All @@ -265,7 +258,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndPara

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndSingletonListInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = Collections.singletonList(new AbstractMap.SimpleEntry<>("field1", "property1"));
final List<Map.Entry<String, String>> combinedQueryParameters = CommandParametersAdapter.appendToExtraQueryParametersIfWebAuthnCapable(
queryParameters,
Expand All @@ -277,7 +269,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndSing

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndArraysAsListInput() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = Arrays.asList(
new AbstractMap.SimpleEntry<>("field1", "property1"),
new AbstractMap.SimpleEntry<>("field2", "property2"));
Expand All @@ -291,7 +282,6 @@ public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndArra

@Test
public void testAppendToExtraQueryParametersIfWebAuthnCapable_setPropertyAndParameterAlreadyPresentInImmutableList() {
Assume.assumeTrue(FidoConstants.IS_PASSKEY_SUPPORT_READY);
final List<Map.Entry<String, String>> queryParameters = Collections.singletonList(new AbstractMap.SimpleEntry<>(
FidoConstants.WEBAUTHN_QUERY_PARAMETER_FIELD,
FidoConstants.WEBAUTHN_QUERY_PARAMETER_VALUE));
Expand Down

0 comments on commit 2d74f93

Please sign in to comment.