完成 SSO 登录的功能

This commit is contained in:
YunaiV
2022-05-24 00:48:35 +08:00
parent d18463866e
commit 668551350f
3 changed files with 52 additions and 35 deletions

View File

@ -14,7 +14,8 @@ public interface OAuth2ApproveMapper extends BaseMapperX<OAuth2ApproveDO> {
return update(updateObj, new LambdaQueryWrapperX<OAuth2ApproveDO>()
.eq(OAuth2ApproveDO::getUserId, updateObj.getUserId())
.eq(OAuth2ApproveDO::getUserType, updateObj.getUserType())
.eq(OAuth2ApproveDO::getClientId, updateObj.getClientId()));
.eq(OAuth2ApproveDO::getClientId, updateObj.getClientId())
.eq(OAuth2ApproveDO::getScope, updateObj.getScope()));
}
default List<OAuth2ApproveDO> selectListByUserIdAndUserTypeAndClientId(Long userId, Integer userType, String clientId) {

View File

@ -26,7 +26,7 @@ public class OAuth2ApproveServiceImpl implements OAuth2ApproveService {
/**
* 批准的过期时间,默认 30 天
*/
private static final Integer TIMEOUT = 30 * 24 * 60; // 单位:秒
private static final Integer TIMEOUT = 30 * 24 * 60 * 60; // 单位:秒
@Resource
private OAuth2ClientService oauth2ClientService;