Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
justauth
JustAuth
比较版本
544ffd5372e5ab608b3279a945bc01e64745c4d0...a3108caccf9063adb2832ad63f27cfb4a7f759cb
J
JustAuth
项目概览
justauth
/
JustAuth
9 个月 前同步成功
通知
351
Star
15209
Fork
2709
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
JustAuth
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
a3108caccf9063adb2832ad63f27cfb4a7f759cb
选择Git版本
...
目标分支
544ffd5372e5ab608b3279a945bc01e64745c4d0
选择Git版本
比较
Commits (3)
https://gitcode.net/justauth/JustAuth/-/commit/172ba7be55b26d26468706a7e5ac07e44c8c55cc
:hankey: 修改用户logo的尺寸
2021-10-16T19:10:24+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/justauth/JustAuth/-/commit/e134dd06b02a03523470f104203d51c5fb0bf68d
:arrow_up: 升级alipay-sdk-version的依赖版本
2021-10-16T19:10:50+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/justauth/JustAuth/-/commit/a3108caccf9063adb2832ad63f27cfb4a7f759cb
:bug: 修复 alipay 登录失败的 BUG
2021-10-16T19:11:24+08:00
yadong.zhang
yadong.zhang0415@gmail.com
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
10 deletion
+12
-10
docs/users/bjgyol.png
docs/users/bjgyol.png
+0
-0
pom.xml
pom.xml
+2
-2
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
+10
-8
未找到文件。
docs/users/bjgyol.png
查看替换文件 @
544ffd53
浏览文件 @
a3108cac
9.5 KB
|
W:
|
H:
3.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
pom.xml
浏览文件 @
a3108cac
...
...
@@ -6,7 +6,7 @@
<groupId>
me.zhyd.oauth
</groupId>
<artifactId>
JustAuth
</artifactId>
<version>
1.16.
4
</version>
<version>
1.16.
5
</version>
<name>
JustAuth
</name>
<url>
https://gitee.com/yadong.zhang/JustAuth
</url>
...
...
@@ -61,7 +61,7 @@
<lombok-version>
1.18.20
</lombok-version>
<junit-version>
4.13.2
</junit-version>
<fastjson-version>
1.2.78
</fastjson-version>
<alipay-sdk-version>
4.1
6.38
.ALL
</alipay-sdk-version>
<alipay-sdk-version>
4.1
7.5
.ALL
</alipay-sdk-version>
<jacoco-version>
0.8.2
</jacoco-version>
</properties>
...
...
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
浏览文件 @
a3108cac
...
...
@@ -41,6 +41,8 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
private
final
AlipayClient
alipayClient
;
private
static
final
String
GATEWAY
=
"https://openapi.alipay.com/gateway.do"
;
/**
* @see AuthAlipayRequest#AuthAlipayRequest(me.zhyd.oauth.config.AuthConfig, java.lang.String)
* @deprecated 请使用带有"alipayPublicKey"参数的构造方法
...
...
@@ -78,8 +80,8 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
public
AuthAlipayRequest
(
AuthConfig
config
,
String
alipayPublicKey
)
{
super
(
config
,
AuthDefaultSource
.
ALIPAY
);
this
.
alipayPublicKey
=
determineAlipayPublicKey
(
alipayPublicKey
,
config
);
this
.
alipayClient
=
new
DefaultAlipayClient
(
AuthDefaultSource
.
ALIPAY
.
accessToken
(),
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
alipayPublicKey
,
"RSA2"
);
check
(
config
);
this
.
alipayClient
=
new
DefaultAlipayClient
(
GATEWAY
,
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
this
.
alipayPublicKey
,
"RSA2"
);
}
/**
...
...
@@ -92,16 +94,16 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
public
AuthAlipayRequest
(
AuthConfig
config
,
String
alipayPublicKey
,
AuthStateCache
authStateCache
)
{
super
(
config
,
AuthDefaultSource
.
ALIPAY
,
authStateCache
);
this
.
alipayPublicKey
=
determineAlipayPublicKey
(
alipayPublicKey
,
config
);
check
(
config
);
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"
,
alipayPublicKey
,
"RSA2"
,
address
.
getHostName
(),
address
.
getPort
());
this
.
alipayClient
=
new
DefaultAlipayClient
(
GATEWAY
,
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
this
.
alipayPublicKey
,
"RSA2"
,
address
.
getHostName
(),
address
.
getPort
());
}
else
{
this
.
alipayClient
=
new
DefaultAlipayClient
(
AuthDefaultSource
.
ALIPAY
.
accessToken
()
,
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
alipayPublicKey
,
"RSA2"
);
this
.
alipayClient
=
new
DefaultAlipayClient
(
GATEWAY
,
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
this
.
alipayPublicKey
,
"RSA2"
);
}
check
(
config
);
}
/**
...
...
@@ -114,9 +116,9 @@ public class AuthAlipayRequest extends AuthDefaultRequest {
public
AuthAlipayRequest
(
AuthConfig
config
,
String
alipayPublicKey
,
AuthStateCache
authStateCache
,
String
proxyHost
,
Integer
proxyPort
)
{
super
(
config
,
AuthDefaultSource
.
ALIPAY
,
authStateCache
);
this
.
alipayPublicKey
=
determineAlipayPublicKey
(
alipayPublicKey
,
config
);
this
.
alipayClient
=
new
DefaultAlipayClient
(
AuthDefaultSource
.
ALIPAY
.
accessToken
(),
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
alipayPublicKey
,
"RSA2"
,
proxyHost
,
proxyPort
);
check
(
config
);
this
.
alipayClient
=
new
DefaultAlipayClient
(
GATEWAY
,
config
.
getClientId
(),
config
.
getClientSecret
(),
"json"
,
"UTF-8"
,
this
.
alipayPublicKey
,
"RSA2"
,
proxyHost
,
proxyPort
);
}
private
String
determineAlipayPublicKey
(
String
alipayPublicKey
,
AuthConfig
config
)
{
...
...