提交 b77de0bd 编写于 作者: cly_0's avatar cly_0

还原

上级 e55033f4
......@@ -155,7 +155,6 @@ public class AuthConfig {
* @since 1.16.0
*/
private String authServerId;
/**
* 忽略校验 {@code redirectUri} 参数,默认不开启。当 {@code ignoreCheckRedirectUri} 为 {@code true} 时,
* {@link me.zhyd.oauth.utils.AuthChecker#checkConfig(AuthConfig, AuthSource)} 将不会校验 {@code redirectUri} 的合法性。
......@@ -164,16 +163,6 @@ public class AuthConfig {
*/
private boolean ignoreCheckRedirectUri;
/**
* 代理地址
*/
private String proxyHost;
/**
* 代理端口号
*/
private Integer proxyPort;
/**
* 适配 builder 模式 set 值的情况
*
......
......@@ -21,6 +21,8 @@ import me.zhyd.oauth.model.AuthUser;
import me.zhyd.oauth.utils.StringUtils;
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) {
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(),
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2", config.getProxyHost(), config.getProxyPort());
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2", address.getHostName(), address.getPort());
} else {
this.alipayClient = new DefaultAlipayClient(AuthDefaultSource.ALIPAY.accessToken(), config.getClientId(), config.getClientSecret(),
"json", "UTF-8", config.getAlipayPublicKey(), "RSA2");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册