From 35524efb3142be167cbe20aeb107eea205633ea0 Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Sun, 22 Nov 2020 23:10:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:jwt=E7=BB=AD=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/youlai/auth/config/AuthorizationServerConfig.java | 2 +- .../java/com/youlai/common/core/constant/AuthConstants.java | 4 ++-- .../java/com/youlai/gateway/config/ResourceServerConfig.java | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java b/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java index 62b47e364..73f1febf6 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java +++ b/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java @@ -82,7 +82,7 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap // refresh token有两种使用方式:重复使用(true)、非重复使用(false),默认为true // 1 重复使用:access token过期刷新时, refresh token过期时间未改变,仍以初次生成的时间为准 // 2 非重复使用:access token过期刷新时, refresh token过期时间延续,在refresh token有效期内刷新便永不失效达到无需再次登录的目的 - .reuseRefreshTokens(false); + .reuseRefreshTokens(true); } diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java index 72e05c989..e0196b24c 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java @@ -59,13 +59,13 @@ public interface AuthConstants { /** * 有来商城后台管理客户端ID */ - String ADMIN_CLIENT_ID="youlai-mall-admin"; + String ADMIN_CLIENT_ID="youlai-admin"; /** * 有来商城微信小程序客户端ID */ - String WEAPP_CLIENT_ID="youlai-mall-weapp"; + String WEAPP_CLIENT_ID="mall-weapp"; /** * 后台管理接口路径匹配 diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java b/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java index cabecd88f..d5dae739e 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java @@ -85,9 +85,7 @@ public class ResourceServerConfig { } /** - * token无效或者已过期 - * - * @return + * token无效或者已过期自定义响应 */ @Bean ServerAuthenticationEntryPoint authenticationEntryPoint() {