mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-06 08:48:27 +08:00
还原
This commit is contained in:
parent
e55033f4f5
commit
b77de0bd0c
@ -155,7 +155,6 @@ public class AuthConfig {
|
|||||||
* @since 1.16.0
|
* @since 1.16.0
|
||||||
*/
|
*/
|
||||||
private String authServerId;
|
private String authServerId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 忽略校验 {@code redirectUri} 参数,默认不开启。当 {@code ignoreCheckRedirectUri} 为 {@code true} 时,
|
* 忽略校验 {@code redirectUri} 参数,默认不开启。当 {@code ignoreCheckRedirectUri} 为 {@code true} 时,
|
||||||
* {@link me.zhyd.oauth.utils.AuthChecker#checkConfig(AuthConfig, AuthSource)} 将不会校验 {@code redirectUri} 的合法性。
|
* {@link me.zhyd.oauth.utils.AuthChecker#checkConfig(AuthConfig, AuthSource)} 将不会校验 {@code redirectUri} 的合法性。
|
||||||
@ -164,16 +163,6 @@ public class AuthConfig {
|
|||||||
*/
|
*/
|
||||||
private boolean ignoreCheckRedirectUri;
|
private boolean ignoreCheckRedirectUri;
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理地址
|
|
||||||
*/
|
|
||||||
private String proxyHost;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 代理端口号
|
|
||||||
*/
|
|
||||||
private Integer proxyPort;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 适配 builder 模式 set 值的情况
|
* 适配 builder 模式 set 值的情况
|
||||||
*
|
*
|
||||||
|
|||||||
@ -21,6 +21,8 @@ import me.zhyd.oauth.model.AuthUser;
|
|||||||
import me.zhyd.oauth.utils.StringUtils;
|
import me.zhyd.oauth.utils.StringUtils;
|
||||||
import me.zhyd.oauth.utils.UrlBuilder;
|
import me.zhyd.oauth.utils.UrlBuilder;
|
||||||
|
|
||||||
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付宝登录
|
* 支付宝登录
|
||||||
*
|
*
|
||||||
@ -39,9 +41,11 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
|
|||||||
|
|
||||||
public AuthAlipayRequest(AuthConfig config, AuthStateCache authStateCache) {
|
public AuthAlipayRequest(AuthConfig config, AuthStateCache authStateCache) {
|
||||||
super(config, AuthDefaultSource.ALIPAY, authStateCache);
|
super(config, AuthDefaultSource.ALIPAY, authStateCache);
|
||||||
if (StringUtils.isNotEmpty(config.getProxyHost()) && config.getProxyPort() != null) {
|
if (config.getHttpConfig() != null && config.getHttpConfig().getProxy() != null
|
||||||
|
&& config.getHttpConfig().getProxy().address() instanceof InetSocketAddress) {
|
||||||
|
InetSocketAddress address = (InetSocketAddress) config.getHttpConfig().getProxy().address();
|
||||||
this.alipayClient = new DefaultAlipayClient(AuthDefaultSource.ALIPAY.accessToken(), config.getClientId(), config.getClientSecret(),
|
this.alipayClient = new DefaultAlipayClient(AuthDefaultSource.ALIPAY.accessToken(), config.getClientId(), config.getClientSecret(),
|
||||||
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2", config.getProxyHost(), config.getProxyPort());
|
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2", address.getHostName(), address.getPort());
|
||||||
} else {
|
} else {
|
||||||
this.alipayClient = new DefaultAlipayClient(AuthDefaultSource.ALIPAY.accessToken(), config.getClientId(), config.getClientSecret(),
|
this.alipayClient = new DefaultAlipayClient(AuthDefaultSource.ALIPAY.accessToken(), config.getClientId(), config.getClientSecret(),
|
||||||
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2");
|
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user