diff --git a/auth/pom.xml b/auth/pom.xml index b3339d0ed3e..a048b81cfe5 100644 --- a/auth/pom.xml +++ b/auth/pom.xml @@ -51,6 +51,21 @@ org.apache.tomcat.embed tomcat-embed-core + + + io.jsonwebtoken + jjwt-api + + + io.jsonwebtoken + jjwt-impl + runtime + + + io.jsonwebtoken + jjwt-jackson + runtime + diff --git a/auth/src/main/java/com/alibaba/nacos/auth/common/AuthConfigs.java b/auth/src/main/java/com/alibaba/nacos/auth/common/AuthConfigs.java index 552454056da..19638654be0 100644 --- a/auth/src/main/java/com/alibaba/nacos/auth/common/AuthConfigs.java +++ b/auth/src/main/java/com/alibaba/nacos/auth/common/AuthConfigs.java @@ -18,6 +18,7 @@ import com.alibaba.nacos.auth.common.env.ReloadableConfigs; import com.alibaba.nacos.common.JustForTest; +import io.jsonwebtoken.io.Decoders; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -67,7 +68,7 @@ public class AuthConfigs { public byte[] getSecretKeyBytes() { if (secretKeyBytes == null) { - secretKeyBytes = secretKey.getBytes(); + secretKeyBytes = Decoders.BASE64.decode(secretKey); } return secretKeyBytes; } diff --git a/console/pom.xml b/console/pom.xml index 571f26691b6..b86ea9358c6 100644 --- a/console/pom.xml +++ b/console/pom.xml @@ -76,20 +76,6 @@ org.springframework.boot spring-boot-starter-security - - io.jsonwebtoken - jjwt-api - - - io.jsonwebtoken - jjwt-impl - runtime - - - io.jsonwebtoken - jjwt-jackson - runtime - diff --git a/core/pom.xml b/core/pom.xml index 59f26f0f31d..51262723efd 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -153,21 +153,6 @@ commons-collections - - io.jsonwebtoken - jjwt-api - - - io.jsonwebtoken - jjwt-impl - runtime - - - io.jsonwebtoken - jjwt-jackson - runtime - - org.reflections reflections