From 01cc3cf62cdbc0630d390c39309663285cc97d27 Mon Sep 17 00:00:00 2001 From: Thumimku Date: Mon, 12 Feb 2024 12:21:13 +0530 Subject: [PATCH] add basic authn id check --- .../ApplicationNativeAuthenticationTestCase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/applicationNativeAuthentication/ApplicationNativeAuthenticationTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/applicationNativeAuthentication/ApplicationNativeAuthenticationTestCase.java index 594481d80a2..e156721a136 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/applicationNativeAuthentication/ApplicationNativeAuthenticationTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/applicationNativeAuthentication/ApplicationNativeAuthenticationTestCase.java @@ -115,6 +115,7 @@ public class ApplicationNativeAuthenticationTestCase extends OAuth2ServiceAbstra private CloseableHttpClient client; private UserManagementClient userMgtServiceClient; private String code; + private static final String basicAuthenticatorId = "QmFzaWNBdXRoZW50aWNhdG9yOkxPQ0FM"; @BeforeClass(alwaysRun = true) public void testInit() throws Exception { @@ -346,6 +347,8 @@ private void validInitClientNativeAuthnResponse(JSONObject json) { authenticator.containsKey(REQUIRED_PARAMS)) { authenticatorId = (String) authenticator.get(AUTHENTICATOR_ID); + Assert.assertEquals(authenticatorId, basicAuthenticatorId, "Authenticator Id is not " + + "equal for basic authenticator ID"); JSONObject metadataNode = (JSONObject) authenticator.get(METADATA); if (metadataNode.containsKey(PROMPT_TYPE) && metadataNode.containsKey(PARAMS)) { paramsArray = (JSONArray) metadataNode.get(PARAMS);