diff --git a/src/main/java/it/pagopa/interop/probing/eservice/mock/webservice/util/SecurityUtil.java b/src/main/java/it/pagopa/interop/probing/eservice/mock/webservice/util/SecurityUtil.java index d97b616..d5ed506 100644 --- a/src/main/java/it/pagopa/interop/probing/eservice/mock/webservice/util/SecurityUtil.java +++ b/src/main/java/it/pagopa/interop/probing/eservice/mock/webservice/util/SecurityUtil.java @@ -5,9 +5,12 @@ import java.security.spec.X509EncodedKeySpec; import java.util.Base64; import io.jsonwebtoken.Jwts; +import java.util.logging.Logger; public class SecurityUtil { + private static final Logger logger = Logger.getLogger(SecurityUtil.class.getName()); + public static boolean checkJwtValid(String authorizationHeader, String pKey) { try { @@ -26,6 +29,7 @@ public static boolean checkJwtValid(String authorizationHeader, String pKey) { Jwts.parserBuilder().setSigningKey(publicKey).build().parseClaimsJws(authTrimmed); } catch (Exception e) { + logger.warning("Exception: " + e.getMessage()); return false; } return true;