From b2b7dc2cb79744ba60369a3523a2b21a1cffa579 Mon Sep 17 00:00:00 2001 From: Sukalpo Mitra Date: Wed, 15 Nov 2023 08:56:32 +0800 Subject: [PATCH] removed printstacktrace --- .../sismics/util/filter/JwtBasedSecurityFilter.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs-web-common/src/main/java/com/sismics/util/filter/JwtBasedSecurityFilter.java b/docs-web-common/src/main/java/com/sismics/util/filter/JwtBasedSecurityFilter.java index f7ece132..79767e6d 100644 --- a/docs-web-common/src/main/java/com/sismics/util/filter/JwtBasedSecurityFilter.java +++ b/docs-web-common/src/main/java/com/sismics/util/filter/JwtBasedSecurityFilter.java @@ -40,7 +40,7 @@ import static java.util.Optional.ofNullable; public class JwtBasedSecurityFilter extends SecurityFilter { private static final Logger log = LoggerFactory.getLogger(JwtBasedSecurityFilter.class); /** - * Name of the cookie used to store the authentication token. + * Name of the header used to store the authentication token. */ public static final String HEADER_NAME = "Authorization"; @@ -82,18 +82,15 @@ public class JwtBasedSecurityFilter extends SecurityFilter { return Boolean.TRUE; } catch (CertificateException e) { //if CertificateException comes from buildJWTVerifier() - log.info("InValid TOKEN"); - e.printStackTrace(); + log.info("InValid TOKEN: " + e.getMessage()); return Boolean.FALSE; } catch (JWTVerificationException e) { // if JWT Token in invalid - log.info("InValid TOKEN"); - e.printStackTrace(); + log.info("InValid TOKEN: " + e.getMessage() ); return Boolean.FALSE; } catch (Exception e) { // If any other exception comes - log.info("InValid TOKEN, Exception Occurred"); - e.printStackTrace(); + log.info("InValid TOKEN, Exception Occurred: " + e.getMessage()); return Boolean.FALSE; } }