From 0ecc8cfb89ba3cfea5827a7b8bf3dc9378de2cf5 Mon Sep 17 00:00:00 2001 From: tanghc Date: Thu, 29 Aug 2019 11:27:56 +0800 Subject: [PATCH] 2.0 --- .../com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java | 5 ++++- .../com/gitee/sop/sopauth/controller/OAuth2Controller.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java index 50becff9..3cabfd59 100644 --- a/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java +++ b/sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java @@ -24,6 +24,8 @@ import java.util.concurrent.TimeUnit; * 1、注释掉OAuth2ManagerCache的@Service。 * 2、打开yml中redis部分 * 3、启用这个类的@Service + * + * @author tanghc */ //@Service public class OAuth2ManagerRedis implements OAuth2Manager { @@ -75,7 +77,8 @@ public class OAuth2ManagerRedis implements OAuth2Manager { redisTemplate.opsForValue().set( getRefreshTokenKey(refreshToken), JSON.toJSONString(new RefreshToken(accessToken, authUser)), - reExpiresIn, // refreshToken过期时间 + // refreshToken过期时间 + reExpiresIn, TimeUnit.SECONDS); } else { redisTemplate.opsForValue().set( diff --git a/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java b/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java index 062d593a..97fcfc6e 100644 --- a/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java +++ b/sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.java @@ -24,6 +24,8 @@ import java.net.URISyntaxException; /** * 授权认证 + * + * @author tanghc */ @Controller @RequestMapping("oauth2")