Browse Source

优化识别

suntianwu 3 years ago
parent
commit
c8128bbd61
2 changed files with 4 additions and 4 deletions
  1. 2 2
      pom.xml
  2. 2 2
      src/main/java/com/iden/common/util/JwtUtils.java

+ 2 - 2
pom.xml

@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.3.2.RELEASE</version>
+        <version>2.3.5.RELEASE</version>
         <relativePath/>
     </parent>
 
@@ -31,7 +31,7 @@
         <admin.version>2.2.2</admin.version>
         <io.springfox.version>2.5.0</io.springfox.version>
         <easyexcel.version>2.1.6</easyexcel.version>
-        <jwt.version>0.9.0</jwt.version>
+        <jwt.version>0.9.1</jwt.version>
     </properties>
 
     <!--环境依赖-->

+ 2 - 2
src/main/java/com/iden/common/util/JwtUtils.java

@@ -5,7 +5,7 @@ import com.iden.common.vo.UserLoginedConvertVO;
 import io.jsonwebtoken.Claims;
 import io.jsonwebtoken.Jwts;
 import io.jsonwebtoken.SignatureAlgorithm;
-import org.apache.commons.codec.binary.Base64;
+import java.util.Base64;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.core.env.Environment;
@@ -33,7 +33,7 @@ public class JwtUtils {
      */
     public static SecretKey generalKey() {
         String stringKey = CommonConfUtil.getConf("auth.jwt.id") + CommonConfUtil.getConf("auth.jwt.secret");
-        byte[] encodedKey = Base64.decodeBase64(stringKey);
+        byte[] encodedKey = stringKey.getBytes();
         SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES");
         return key;
     }