mirror of
				https://github.com/suyiiyii/SIMS.git
				synced 2025-11-04 15:54:52 +08:00 
			
		
		
		
	jwt: token有效期两周,便于调试
This commit is contained in:
		
							parent
							
								
									a21aadf283
								
							
						
					
					
						commit
						01fe90b0d3
					
				@ -42,7 +42,7 @@ public class JwtUtils {
 | 
			
		||||
    public static String createToken(String userId, String sign) {
 | 
			
		||||
        return JWT.create()
 | 
			
		||||
                .withAudience(userId)
 | 
			
		||||
                .withExpiresAt(DateUtil.offsetHour(new Date(), 2))
 | 
			
		||||
                .withExpiresAt(DateUtil.offsetWeek(new Date(), 2))
 | 
			
		||||
                .sign(Algorithm.HMAC256(sign));
 | 
			
		||||
        // 设置令牌过期时间为2小时
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user