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);