mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2025-01-04 01:52:21 +08:00
fix(ClientDetailsServiceImpl.java): OAuth2客户端在管理端设置access_token有效期无效问题
This commit is contained in:
parent
f5429c463a
commit
3db1d6fd42
@ -1,4 +1,5 @@
|
|||||||
package com.youlai.auth.security.service;
|
package com.youlai.auth.security.service;
|
||||||
|
|
||||||
import com.youlai.admin.api.OAuthClientFeignClient;
|
import com.youlai.admin.api.OAuthClientFeignClient;
|
||||||
import com.youlai.admin.pojo.entity.SysOauthClient;
|
import com.youlai.admin.pojo.entity.SysOauthClient;
|
||||||
import com.youlai.auth.common.enums.PasswordEncoderTypeEnum;
|
import com.youlai.auth.common.enums.PasswordEncoderTypeEnum;
|
||||||
@ -32,8 +33,11 @@ public class ClientDetailsServiceImpl implements ClientDetailsService {
|
|||||||
client.getScope(),
|
client.getScope(),
|
||||||
client.getAuthorizedGrantTypes(),
|
client.getAuthorizedGrantTypes(),
|
||||||
client.getAuthorities(),
|
client.getAuthorities(),
|
||||||
client.getWebServerRedirectUri());
|
client.getWebServerRedirectUri()
|
||||||
|
);
|
||||||
clientDetails.setClientSecret(PasswordEncoderTypeEnum.NOOP.getPrefix() + client.getClientSecret());
|
clientDetails.setClientSecret(PasswordEncoderTypeEnum.NOOP.getPrefix() + client.getClientSecret());
|
||||||
|
clientDetails.setAccessTokenValiditySeconds(client.getAccessTokenValidity());
|
||||||
|
clientDetails.setRefreshTokenValiditySeconds(client.getRefreshTokenValidity());
|
||||||
return clientDetails;
|
return clientDetails;
|
||||||
} else {
|
} else {
|
||||||
throw new NoSuchClientException("No client with requested id: " + clientId);
|
throw new NoSuchClientException("No client with requested id: " + clientId);
|
||||||
|
Loading…
Reference in New Issue
Block a user