From 16df31d0f28984edc3ffaf0c2001e3a6fff4388e Mon Sep 17 00:00:00 2001 From: Darshan Nagesh <darshan.nagesh@tarento.com> Date: Fri, 18 Feb 2022 12:59:18 +0530 Subject: [PATCH] Removing the bearer prefix --- .../java/com/tarento/retail/config/JwtAuthenticationFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/tarento/retail/config/JwtAuthenticationFilter.java b/src/main/java/com/tarento/retail/config/JwtAuthenticationFilter.java index 7af840a..9088c5f 100644 --- a/src/main/java/com/tarento/retail/config/JwtAuthenticationFilter.java +++ b/src/main/java/com/tarento/retail/config/JwtAuthenticationFilter.java @@ -36,7 +36,7 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter { logger.info("Method : " + req.getMethod()); String username = null; String authToken = null; - if (header != null && header.startsWith(TOKEN_PREFIX)) { + if (header != null){ authToken = header.replace(TOKEN_PREFIX,""); try { username = jwtTokenUtil.getUsernameFromToken(authToken); -- GitLab