From 8d80cb190df6f0f0d70b3c4bd6c0f5dcc35318f6 Mon Sep 17 00:00:00 2001 From: Thushani Jayasekera Date: Tue, 29 Oct 2024 12:04:38 +0530 Subject: [PATCH] Add additional change to support test key --- .../enforcer/security/jwt/UnsecuredAPIAuthenticator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/UnsecuredAPIAuthenticator.java b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/UnsecuredAPIAuthenticator.java index 4ea9b6a9ef..680503fdaa 100644 --- a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/UnsecuredAPIAuthenticator.java +++ b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/UnsecuredAPIAuthenticator.java @@ -86,9 +86,9 @@ public AuthenticationContext authenticate(RequestContext requestContext) throws if (requestContext.getMatchedAPI().getApiType().equalsIgnoreCase(APIConstants.ApiType.WEB_SOCKET)) { String secProtocolHeader = requestContext.getHeaders().get(HttpConstants.WEBSOCKET_PROTOCOL_HEADER); if (secProtocolHeader != null) { - if (secProtocolHeader.contains(Constants.WS_API_KEY_IDENTIFIER)) { + if (secProtocolHeader.contains(Constants.WS_TEST_KEY_IDENTIFIER)) { AuthenticatorUtils.addWSProtocolResponseHeaderIfRequired(requestContext, - Constants.WS_API_KEY_IDENTIFIER); + Constants.WS_TEST_KEY_IDENTIFIER); } else if (secProtocolHeader.contains(Constants.WS_OAUTH2_KEY_IDENTIFIED)) { AuthenticatorUtils.addWSProtocolResponseHeaderIfRequired(requestContext, Constants.WS_OAUTH2_KEY_IDENTIFIED);