From f3de04db06bae67537d093017e28863ee685f8a3 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期五, 03 一月 2025 13:36:38 +0800 Subject: [PATCH] 修改dynamicSettings为空异常 --- iailab-cloud/iailab-gateway/src/main/java/com/iailab/gateway/filter/security/TokenAuthenticationFilter.java | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/iailab-cloud/iailab-gateway/src/main/java/com/iailab/gateway/filter/security/TokenAuthenticationFilter.java b/iailab-cloud/iailab-gateway/src/main/java/com/iailab/gateway/filter/security/TokenAuthenticationFilter.java index 499145f..838c75d 100644 --- a/iailab-cloud/iailab-gateway/src/main/java/com/iailab/gateway/filter/security/TokenAuthenticationFilter.java +++ b/iailab-cloud/iailab-gateway/src/main/java/com/iailab/gateway/filter/security/TokenAuthenticationFilter.java @@ -96,7 +96,7 @@ return getLoginUser(exchange, token).defaultIfEmpty(LOGIN_USER_EMPTY).flatMap(user -> { // 1. 无用户,直接 filter 继续请求 if (user == LOGIN_USER_EMPTY || // 下面 expiresTime 的判断,为了解决 token 实际已经过期的情况 - user.getExpiresTime() == null || LocalDateTimeUtils.afterNow(user.getExpiresTime())) { + user.getExpiresTime() == null || LocalDateTimeUtils.beforeNow(user.getExpiresTime())) { return chain.filter(exchange); } @@ -163,5 +163,4 @@ public int getOrder() { return -100; // 和 Spring Security Filter 的顺序对齐 } - } -- Gitblit v1.9.3