pull/1/head
tanghc 5 years ago
parent 7e3c40ed92
commit 0ecc8cfb89
  1. 5
      sop-auth/src/main/java/com/gitee/sop/sopauth/auth/impl/OAuth2ManagerRedis.java
  2. 2
      sop-auth/src/main/java/com/gitee/sop/sopauth/controller/OAuth2Controller.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(

@ -24,6 +24,8 @@ import java.net.URISyntaxException;
/**
* 授权认证
*
* @author tanghc
*/
@Controller
@RequestMapping("oauth2")

Loading…
Cancel
Save