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")