From b58e66a26d0aa36c58ef5683b1063dcf389cb4d8 Mon Sep 17 00:00:00 2001 From: rashm1n Date: Mon, 8 Jan 2024 12:07:04 +0530 Subject: [PATCH] Moving log.info --- .../connect/enforcer/security/jwt/JWTAuthenticator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 c938b01780..01ebcf6218 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 @@ -416,6 +416,8 @@ private void checkTokenEnvAgainstDeploymentType(String keyType, APIConfig matche if (System.getenv("DEPLOYMENT_TYPE_ENFORCED") != null && System.getenv("DEPLOYMENT_TYPE_ENFORCED").equalsIgnoreCase("false") && keyType.equalsIgnoreCase(APIConstants.JwtTokenConstants.PRODUCTION_KEY_TYPE)) { + log.info("Deprecated: Production access token is used to access sandbox API deployment in " + + "organization : " + matchedAPI.getOrganizationId()); if (!prodTokenNonProdAllowedOrgs.isEmpty()) { if (prodTokenNonProdAllowedOrgs.contains(matchedAPI.getOrganizationId())) { return; @@ -424,9 +426,6 @@ private void checkTokenEnvAgainstDeploymentType(String keyType, APIConfig matche APISecurityConstants.API_AUTH_INVALID_ENVIRONMENT, APISecurityConstants.API_AUTH_INVALID_ENVIRONMENT_ERROR_MESSAGE); } - - log.info("Deprecated: Production access token is used to access sandbox API deployment in " + - "organization : " + matchedAPI.getOrganizationId()); return; }