mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 10:13:28 +08:00
社交登录配置新增请求范围字段
This commit is contained in:
parent
b4710edc18
commit
2e66b9202c
@ -2,6 +2,8 @@ package org.dromara.common.social.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 社交登录配置
|
||||
*
|
||||
@ -65,4 +67,9 @@ public class SocialLoginConfigProperties {
|
||||
*/
|
||||
private String serverUrl;
|
||||
|
||||
/**
|
||||
* 请求范围
|
||||
*/
|
||||
private List<String> scopes;
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@ import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.common.social.config.properties.SocialLoginConfigProperties;
|
||||
import org.dromara.common.social.config.properties.SocialProperties;
|
||||
import org.dromara.common.social.maxkey.AuthMaxKeyRequest;
|
||||
import org.dromara.common.social.topiam.AuthTopIamRequest;
|
||||
|
||||
/**
|
||||
* 认证授权工具类
|
||||
@ -38,7 +39,8 @@ public class SocialUtils {
|
||||
AuthConfig.AuthConfigBuilder builder = AuthConfig.builder()
|
||||
.clientId(obj.getClientId())
|
||||
.clientSecret(obj.getClientSecret())
|
||||
.redirectUri(obj.getRedirectUri());
|
||||
.redirectUri(obj.getRedirectUri())
|
||||
.scopes(obj.getScopes());
|
||||
return switch (source.toLowerCase()) {
|
||||
case "dingtalk" -> new AuthDingTalkRequest(builder.build(), STATE_CACHE);
|
||||
case "baidu" -> new AuthBaiduRequest(builder.build(), STATE_CACHE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user