Parcourir la source

认证服务代码整理,加注释

nnkwrik il y a 6 ans
Parent
commit
db28b360db

+ 0 - 5
auth-service/pom.xml

@@ -49,11 +49,6 @@
             <scope>provided</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>com.github.binarywang</groupId>
             <artifactId>weixin-java-miniapp</artifactId>

+ 13 - 1
auth-service/src/test/java/io/github/nnkwrik/authservice/jwt/GenerateToken.java

@@ -17,6 +17,8 @@ import java.time.temporal.ChronoUnit;
 import java.util.Date;
 
 /**
+ * 生产环境下可以用这个生成Token进行测试
+ *
  * @author nnkwrik
  * @date 18/11/19 9:47
  */
@@ -28,7 +30,7 @@ public class GenerateToken {
     private TokenCreator creator;
 
     /**
-     * 生产环境下可以用这个生Token进行测试
+     * 生成测试用JWT
      */
     @Test
     public void generateToken() throws IllegalAccessException {
@@ -45,6 +47,11 @@ public class GenerateToken {
 
     }
 
+    /**
+     * 生成已过期的JWT
+     *
+     * @throws IllegalAccessException
+     */
     @Test
     public void generateExpiredToken() throws IllegalAccessException {
         String openId = "1";
@@ -59,6 +66,11 @@ public class GenerateToken {
         System.out.println("\n=========================================================");
     }
 
+    /**
+     * 生成不会过期的JWT
+     *
+     * @throws IllegalAccessException
+     */
     @Test
     public void generateNoExpiredToken() throws IllegalAccessException {
         String openId = "1";