diff --git a/src/main/java/com/yolo/keyborad/Interceptor/SignInterceptor.java b/src/main/java/com/yolo/keyborad/Interceptor/SignInterceptor.java index 3660e0c..0830808 100644 --- a/src/main/java/com/yolo/keyborad/Interceptor/SignInterceptor.java +++ b/src/main/java/com/yolo/keyborad/Interceptor/SignInterceptor.java @@ -26,10 +26,10 @@ public class SignInterceptor implements HandlerInterceptor { .configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true); private final StringRedisTemplate redisTemplate; - // 允许时间误差 5 分钟 - private static final long ALLOW_TIME_DIFF_SECONDS = 300; + // 允许时间误差 20秒 + private static final long ALLOW_TIME_DIFF_SECONDS = 20; // nonce 在 Redis 的有效期(建议比时间误差略长一点) - private static final long NONCE_EXPIRE_SECONDS = 300; + private static final long NONCE_EXPIRE_SECONDS = 30; public SignInterceptor(Map appSecretMap, StringRedisTemplate redisTemplate) {