From 5c4fa0b63a003bbe4d0c3d81dc13bfe4860c8652 Mon Sep 17 00:00:00 2001 From: lulz1 Date: Sun, 18 Feb 2024 14:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 11 ----------- .../webconfig/JwtTokenAdminInterceptor.java | 6 ++++-- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index d49362bb..3ccfd804 100644 --- a/pom.xml +++ b/pom.xml @@ -92,17 +92,6 @@ org.springframework.boot spring-boot-maven-plugin - - - paketobuildpacks/builder-jammy-base:latest - - - - org.projectlombok - lombok - - - org.apache.maven.plugins diff --git a/src/main/java/com/chint/infrastructure/webconfig/JwtTokenAdminInterceptor.java b/src/main/java/com/chint/infrastructure/webconfig/JwtTokenAdminInterceptor.java index da87d686..c0891c83 100644 --- a/src/main/java/com/chint/infrastructure/webconfig/JwtTokenAdminInterceptor.java +++ b/src/main/java/com/chint/infrastructure/webconfig/JwtTokenAdminInterceptor.java @@ -2,6 +2,7 @@ package com.chint.infrastructure.webconfig; import com.chint.domain.aggregates.user.User; import com.chint.infrastructure.util.BaseContext; +import com.chint.infrastructure.util.Digest; import com.chint.infrastructure.util.JWTUtil; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -30,8 +31,9 @@ public class JwtTokenAdminInterceptor implements HandlerInterceptor { } try { - JWTUtil.verifyJWT(SECRET, token); - var parseJWT = JWTUtil.parseJWT(SECRET, token); + String str = Digest.aesBack(token); + JWTUtil.verifyJWT(SECRET, str); + var parseJWT = JWTUtil.parseJWT(SECRET, str); var withJwt = User.withJwt(parseJWT); BaseContext.setCurrentUser(withJwt); return true; // If verification succeeds, continue processing the request