mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-23 23:09:47 +08:00
update 优化 对三方授权 redirectUri 回调地址进行url编码
This commit is contained in:
@ -14,6 +14,9 @@ import org.dromara.common.social.gitea.AuthGiteaRequest;
|
|||||||
import org.dromara.common.social.maxkey.AuthMaxKeyRequest;
|
import org.dromara.common.social.maxkey.AuthMaxKeyRequest;
|
||||||
import org.dromara.common.social.topiam.AuthTopIamRequest;
|
import org.dromara.common.social.topiam.AuthTopIamRequest;
|
||||||
|
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 认证授权工具类
|
* 认证授权工具类
|
||||||
*
|
*
|
||||||
@ -40,7 +43,7 @@ public class SocialUtils {
|
|||||||
AuthConfig.AuthConfigBuilder builder = AuthConfig.builder()
|
AuthConfig.AuthConfigBuilder builder = AuthConfig.builder()
|
||||||
.clientId(obj.getClientId())
|
.clientId(obj.getClientId())
|
||||||
.clientSecret(obj.getClientSecret())
|
.clientSecret(obj.getClientSecret())
|
||||||
.redirectUri(obj.getRedirectUri())
|
.redirectUri(URLEncoder.encode(obj.getRedirectUri(), StandardCharsets.UTF_8))
|
||||||
.scopes(obj.getScopes());
|
.scopes(obj.getScopes());
|
||||||
return switch (source.toLowerCase()) {
|
return switch (source.toLowerCase()) {
|
||||||
case "dingtalk" -> new AuthDingTalkV2Request(builder.build(), STATE_CACHE);
|
case "dingtalk" -> new AuthDingTalkV2Request(builder.build(), STATE_CACHE);
|
||||||
|
Reference in New Issue
Block a user