Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
晓序
JustAuth
提交
c0dd700b
J
JustAuth
项目概览
晓序
/
JustAuth
与 Fork 源项目一致
Fork自
justauth / JustAuth
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
c0dd700b
编写于
6月 18, 2019
作者:
智布道
👁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
🎨
解决Issue #IY2OH
上级
f32c341b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
4 deletion
+16
-4
pom.xml
pom.xml
+1
-1
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
+4
-1
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
+1
-0
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
+3
-1
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
+3
-1
update.md
update.md
+4
-0
未找到文件。
pom.xml
浏览文件 @
c0dd700b
...
...
@@ -6,7 +6,7 @@
<groupId>
me.zhyd.oauth
</groupId>
<artifactId>
JustAuth
</artifactId>
<version>
1.6.
0
-beta
</version>
<version>
1.6.
1
-beta
</version>
<name>
JustAuth
</name>
<url>
https://gitee.com/yadong.zhang/JustAuth
</url>
...
...
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
浏览文件 @
c0dd700b
...
...
@@ -67,14 +67,17 @@ public class AuthAlipayRequest extends BaseAuthRequest {
if
(!
response
.
isSuccess
())
{
throw
new
AuthException
(
response
.
getSubMsg
());
}
String
province
=
response
.
getProvince
(),
city
=
response
.
getCity
();
String
location
=
String
.
format
(
"%s %s"
,
StringUtils
.
isEmpty
(
province
)
?
""
:
province
,
StringUtils
.
isEmpty
(
city
)
?
""
:
city
);
return
AuthUser
.
builder
()
.
uuid
(
response
.
getUserId
())
.
username
(
StringUtils
.
isEmpty
(
response
.
getUserName
())
?
response
.
getNickName
()
:
response
.
getUserName
())
.
nickname
(
response
.
getNickName
())
.
avatar
(
response
.
getAvatar
())
.
location
(
String
.
format
(
"%s %s"
,
StringUtils
.
isEmpty
(
province
)
?
""
:
province
,
StringUtils
.
isEmpty
(
city
)
?
""
:
city
)
)
.
location
(
location
)
.
gender
(
AuthUserGender
.
getRealGender
(
response
.
getGender
()))
.
token
(
authToken
)
.
source
(
AuthSource
.
ALIPAY
)
...
...
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
浏览文件 @
c0dd700b
...
...
@@ -45,6 +45,7 @@ public class AuthCodingRequest extends BaseAuthRequest {
if
(
object
.
getIntValue
(
"code"
)
!=
0
)
{
throw
new
AuthException
(
object
.
getString
(
"msg"
));
}
object
=
object
.
getJSONObject
(
"data"
);
return
AuthUser
.
builder
()
.
uuid
(
object
.
getString
(
"id"
))
...
...
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
浏览文件 @
c0dd700b
...
...
@@ -59,11 +59,13 @@ public class AuthQqRequest extends BaseAuthRequest {
if
(
StringUtils
.
isEmpty
(
avatar
))
{
avatar
=
object
.
getString
(
"figureurl_qq_1"
);
}
String
location
=
String
.
format
(
"%s-%s"
,
object
.
getString
(
"province"
),
object
.
getString
(
"city"
));
return
AuthUser
.
builder
()
.
username
(
object
.
getString
(
"nickname"
))
.
nickname
(
object
.
getString
(
"nickname"
))
.
avatar
(
avatar
)
.
location
(
object
.
getString
(
"province"
)
+
"-"
+
object
.
getString
(
"city"
)
)
.
location
(
location
)
.
uuid
(
openId
)
.
gender
(
AuthUserGender
.
getRealGender
(
object
.
getString
(
"gender"
)))
.
token
(
authToken
)
...
...
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
浏览文件 @
c0dd700b
...
...
@@ -42,11 +42,12 @@ public class AuthWeChatRequest extends BaseAuthRequest {
this
.
checkResponse
(
object
);
String
location
=
String
.
format
(
"%s-%s-%s"
,
object
.
getString
(
"country"
),
object
.
getString
(
"province"
),
object
.
getString
(
"city"
));
return
AuthUser
.
builder
()
.
username
(
object
.
getString
(
"nickname"
))
.
nickname
(
object
.
getString
(
"nickname"
))
.
avatar
(
object
.
getString
(
"headimgurl"
))
.
location
(
object
.
getString
(
"country"
)
+
"-"
+
object
.
getString
(
"province"
)
+
"-"
+
object
.
getString
(
"city"
)
)
.
location
(
location
)
.
uuid
(
openId
)
.
gender
(
AuthUserGender
.
getRealGender
(
object
.
getString
(
"sex"
)))
.
token
(
authToken
)
...
...
@@ -73,6 +74,7 @@ public class AuthWeChatRequest extends BaseAuthRequest {
throw
new
AuthException
(
object
.
getIntValue
(
"errcode"
),
object
.
getString
(
"errmsg"
));
}
}
/**
* 获取token,适用于获取access_token和刷新token
*
...
...
update.md
浏览文件 @
c0dd700b
### 2019/06/18
1.
解决Issue
[
#IY2HW
](
https://gitee.com/yadong.zhang/JustAuth/issues/IY2HW
)
1.
解决Issue
[
#IY2OH
](
https://gitee.com/yadong.zhang/JustAuth/issues/IY2OH
)
### 2019/06/06
1.
增加今日头条的授权登陆
2.
发布1.6.0-beta版本,今日头条开发者暂时不能认证, 所以无法做测试,等测试通过后,正式发布release版本
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录