diff --git a/runtime/config-deployer-service/ballerina/APIClient.bal b/runtime/config-deployer-service/ballerina/APIClient.bal index a11f5ca900..b5ea081e25 100644 --- a/runtime/config-deployer-service/ballerina/APIClient.bal +++ b/runtime/config-deployer-service/ballerina/APIClient.bal @@ -361,7 +361,7 @@ public class APIClient { } else if authentication.authType == "JWT" { JWTAuthentication jwtAuthentication = check authentication.cloneWithType(JWTAuthentication); authTypes.jwt = {header: jwtAuthentication.headerName, sendTokenToUpstream: jwtAuthentication.sendTokenToUpstream, disabled: !jwtAuthentication.enabled, audience: jwtAuthentication.audience}; - } else if authentication.authType == "APIKey" && authentication is APIKeyAuthentication { + } else if authentication.authType == "APIKey" { APIKeyAuthentication apiKeyAuthentication = check authentication.cloneWithType(APIKeyAuthentication); model:APIKey[] apiKeys = []; boolean|() headerEnabled = apiKeyAuthentication.headerEnable; diff --git a/runtime/config-deployer-service/ballerina/tests/resources/apiKeyOnly.apk-conf b/runtime/config-deployer-service/ballerina/tests/resources/apiKeyOnly.apk-conf index 52ef282892..b1f0824119 100644 --- a/runtime/config-deployer-service/ballerina/tests/resources/apiKeyOnly.apk-conf +++ b/runtime/config-deployer-service/ballerina/tests/resources/apiKeyOnly.apk-conf @@ -18,6 +18,7 @@ authentication: - authType: "APIKey" enabled: true queryParamEnable: true + headerEnable: true corsConfiguration: corsConfigurationEnabled: false accessControlAllowOrigins: diff --git a/runtime/config-deployer-service/ballerina/tests/resources/jwtandAPIKey.apk-conf b/runtime/config-deployer-service/ballerina/tests/resources/jwtandAPIKey.apk-conf index 62d5518b9a..88b21c4aa3 100644 --- a/runtime/config-deployer-service/ballerina/tests/resources/jwtandAPIKey.apk-conf +++ b/runtime/config-deployer-service/ballerina/tests/resources/jwtandAPIKey.apk-conf @@ -20,6 +20,7 @@ authentication: - authType: "APIKey" enabled: true queryParamEnable: true + headerEnable: true corsConfiguration: corsConfigurationEnabled: false accessControlAllowOrigins: