diff --git a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java index 18c91a9725..836126839c 100644 --- a/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java +++ b/enforcer-parent/enforcer/src/main/java/org/wso2/choreo/connect/enforcer/security/jwt/JWTAuthenticator.java @@ -344,12 +344,12 @@ protected void checkTokenEnvAgainstDeploymentEnv(String keyEnvId, APIConfig matc throws APISecurityException { // Enable Key Env validation only if system property is set. - String disableRoleValidation = System.getProperty(ENABLE_KEY_ENV_VALIDATION); - if (!Boolean.parseBoolean(disableRoleValidation)) { + String disableKeyEnvValidation = System.getProperty(ENABLE_KEY_ENV_VALIDATION); + if (!Boolean.parseBoolean(disableKeyEnvValidation)) { return; } - // TODO: This needs to be changed to Choreo env. + // TODO(senthalan): This needs to be changed to Choreo env id when the migration is done. String apiEnvName = matchedAPI.getEnvironmentName(); if (StringUtils.isNotEmpty(keyEnvId) && !StringUtils.equals(keyEnvId, DEFAULT_CHOREO_ENV_ID)) { if (StringUtils.equals(keyEnvId, apiEnvName)) {