Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
My_csdo
JustAuth
提交
0ed3092d
J
JustAuth
项目概览
My_csdo
/
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看板
提交
0ed3092d
编写于
7月 17, 2019
作者:
H
Hongwei Peng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix spelling
上级
8d1f700e
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
15 addition
and
15 deletion
+15
-15
src/main/java/me/zhyd/oauth/model/AuthUserGender.java
src/main/java/me/zhyd/oauth/model/AuthUserGender.java
+3
-3
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
...main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java
src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
+1
-1
src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java
...ain/java/me/zhyd/oauth/request/AuthTeambitionRequest.java
+1
-1
未找到文件。
src/main/java/me/zhyd/oauth/model/AuthUserGender.java
浏览文件 @
0ed3092d
...
@@ -10,7 +10,7 @@ import java.util.Arrays;
...
@@ -10,7 +10,7 @@ import java.util.Arrays;
* @since 1.8
* @since 1.8
*/
*/
public
enum
AuthUserGender
{
public
enum
AuthUserGender
{
MALE
(
1
,
"男"
),
FEMALE
(
0
,
"女"
),
UNKNOW
(-
1
,
"未知"
);
MALE
(
1
,
"男"
),
FEMALE
(
0
,
"女"
),
UNKNOW
N
(-
1
,
"未知"
);
private
int
code
;
private
int
code
;
private
String
desc
;
private
String
desc
;
...
@@ -21,7 +21,7 @@ public enum AuthUserGender {
...
@@ -21,7 +21,7 @@ public enum AuthUserGender {
public
static
AuthUserGender
getRealGender
(
String
code
)
{
public
static
AuthUserGender
getRealGender
(
String
code
)
{
if
(
code
==
null
)
{
if
(
code
==
null
)
{
return
UNKNOW
;
return
UNKNOW
N
;
}
}
String
[]
males
=
{
"m"
,
"男"
,
"1"
,
"male"
};
String
[]
males
=
{
"m"
,
"男"
,
"1"
,
"male"
};
if
(
Arrays
.
asList
(
males
).
contains
(
code
.
toLowerCase
()))
{
if
(
Arrays
.
asList
(
males
).
contains
(
code
.
toLowerCase
()))
{
...
@@ -31,7 +31,7 @@ public enum AuthUserGender {
...
@@ -31,7 +31,7 @@ public enum AuthUserGender {
if
(
Arrays
.
asList
(
females
).
contains
(
code
.
toLowerCase
()))
{
if
(
Arrays
.
asList
(
females
).
contains
(
code
.
toLowerCase
()))
{
return
FEMALE
;
return
FEMALE
;
}
}
return
UNKNOW
;
return
UNKNOW
N
;
}
}
public
int
getCode
()
{
public
int
getCode
()
{
...
...
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
浏览文件 @
0ed3092d
...
@@ -53,7 +53,7 @@ public class AuthCsdnRequest extends AuthDefaultRequest {
...
@@ -53,7 +53,7 @@ public class AuthCsdnRequest extends AuthDefaultRequest {
.
username
(
object
.
getString
(
"username"
))
.
username
(
object
.
getString
(
"username"
))
.
remark
(
object
.
getString
(
"description"
))
.
remark
(
object
.
getString
(
"description"
))
.
blog
(
object
.
getString
(
"website"
))
.
blog
(
object
.
getString
(
"website"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
CSDN
)
.
source
(
AuthSource
.
CSDN
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
浏览文件 @
0ed3092d
...
@@ -63,7 +63,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest {
...
@@ -63,7 +63,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest {
.
uuid
(
object
.
getString
(
"unionid"
))
.
uuid
(
object
.
getString
(
"unionid"
))
.
nickname
(
object
.
getString
(
"nick"
))
.
nickname
(
object
.
getString
(
"nick"
))
.
username
(
object
.
getString
(
"nick"
))
.
username
(
object
.
getString
(
"nick"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
source
(
AuthSource
.
DINGTALK
)
.
source
(
AuthSource
.
DINGTALK
)
.
token
(
token
)
.
token
(
token
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
浏览文件 @
0ed3092d
...
@@ -49,7 +49,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest {
...
@@ -49,7 +49,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest {
.
nickname
(
userInfoObject
.
getString
(
"nickname"
))
.
nickname
(
userInfoObject
.
getString
(
"nickname"
))
.
avatar
(
userInfoObject
.
getString
(
"avatar"
))
.
avatar
(
userInfoObject
.
getString
(
"avatar"
))
.
remark
(
userInfoObject
.
getString
(
"description"
))
.
remark
(
userInfoObject
.
getString
(
"description"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
DOUYIN
)
.
source
(
AuthSource
.
DOUYIN
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
浏览文件 @
0ed3092d
...
@@ -55,7 +55,7 @@ public class AuthGiteeRequest extends AuthDefaultRequest {
...
@@ -55,7 +55,7 @@ public class AuthGiteeRequest extends AuthDefaultRequest {
.
location
(
object
.
getString
(
"address"
))
.
location
(
object
.
getString
(
"address"
))
.
email
(
object
.
getString
(
"email"
))
.
email
(
object
.
getString
(
"email"
))
.
remark
(
object
.
getString
(
"bio"
))
.
remark
(
object
.
getString
(
"bio"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
GITEE
)
.
source
(
AuthSource
.
GITEE
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
浏览文件 @
0ed3092d
...
@@ -58,7 +58,7 @@ public class AuthGithubRequest extends AuthDefaultRequest {
...
@@ -58,7 +58,7 @@ public class AuthGithubRequest extends AuthDefaultRequest {
.
location
(
object
.
getString
(
"location"
))
.
location
(
object
.
getString
(
"location"
))
.
email
(
object
.
getString
(
"email"
))
.
email
(
object
.
getString
(
"email"
))
.
remark
(
object
.
getString
(
"bio"
))
.
remark
(
object
.
getString
(
"bio"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
GITHUB
)
.
source
(
AuthSource
.
GITHUB
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
浏览文件 @
0ed3092d
...
@@ -61,7 +61,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest {
...
@@ -61,7 +61,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest {
.
nickname
(
object
.
getString
(
"name"
))
.
nickname
(
object
.
getString
(
"name"
))
.
location
(
object
.
getString
(
"locale"
))
.
location
(
object
.
getString
(
"locale"
))
.
email
(
object
.
getString
(
"email"
))
.
email
(
object
.
getString
(
"email"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
GOOGLE
)
.
source
(
AuthSource
.
GOOGLE
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
浏览文件 @
0ed3092d
...
@@ -81,7 +81,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest {
...
@@ -81,7 +81,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest {
.
avatar
(
avatar
)
.
avatar
(
avatar
)
.
email
(
email
)
.
email
(
email
)
.
token
(
authToken
)
.
token
(
authToken
)
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
source
(
AuthSource
.
LINKEDIN
)
.
source
(
AuthSource
.
LINKEDIN
)
.
build
();
.
build
();
}
}
...
...
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
浏览文件 @
0ed3092d
...
@@ -78,7 +78,7 @@ public class AuthMiRequest extends AuthDefaultRequest {
...
@@ -78,7 +78,7 @@ public class AuthMiRequest extends AuthDefaultRequest {
.
nickname
(
user
.
getString
(
"miliaoNick"
))
.
nickname
(
user
.
getString
(
"miliaoNick"
))
.
avatar
(
user
.
getString
(
"miliaoIcon"
))
.
avatar
(
user
.
getString
(
"miliaoIcon"
))
.
email
(
user
.
getString
(
"mail"
))
.
email
(
user
.
getString
(
"mail"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
MI
)
.
source
(
AuthSource
.
MI
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
浏览文件 @
0ed3092d
...
@@ -83,7 +83,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
...
@@ -83,7 +83,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
.
nickname
(
object
.
getString
(
"displayName"
))
.
nickname
(
object
.
getString
(
"displayName"
))
.
location
(
object
.
getString
(
"officeLocation"
))
.
location
(
object
.
getString
(
"officeLocation"
))
.
email
(
object
.
getString
(
"mail"
))
.
email
(
object
.
getString
(
"mail"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
MICROSOFT
)
.
source
(
AuthSource
.
MICROSOFT
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java
浏览文件 @
0ed3092d
...
@@ -77,7 +77,7 @@ public class AuthRenrenRequest extends AuthDefaultRequest {
...
@@ -77,7 +77,7 @@ public class AuthRenrenRequest extends AuthDefaultRequest {
private
AuthUserGender
getGender
(
JSONObject
userObj
)
{
private
AuthUserGender
getGender
(
JSONObject
userObj
)
{
JSONObject
basicInformation
=
userObj
.
getJSONObject
(
"basicInformation"
);
JSONObject
basicInformation
=
userObj
.
getJSONObject
(
"basicInformation"
);
if
(
Objects
.
isNull
(
basicInformation
))
{
if
(
Objects
.
isNull
(
basicInformation
))
{
return
AuthUserGender
.
UNKNOW
;
return
AuthUserGender
.
UNKNOW
N
;
}
}
return
AuthUserGender
.
getRealGender
(
basicInformation
.
getString
(
"sex"
));
return
AuthUserGender
.
getRealGender
(
basicInformation
.
getString
(
"sex"
));
}
}
...
...
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
浏览文件 @
0ed3092d
...
@@ -47,7 +47,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest {
...
@@ -47,7 +47,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest {
.
uuid
(
accessTokenObject
.
getString
(
"taobao_user_id"
))
.
uuid
(
accessTokenObject
.
getString
(
"taobao_user_id"
))
.
username
(
nick
)
.
username
(
nick
)
.
nickname
(
nick
)
.
nickname
(
nick
)
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
TAOBAO
)
.
source
(
AuthSource
.
TAOBAO
)
.
build
();
.
build
();
...
...
src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java
浏览文件 @
0ed3092d
...
@@ -66,7 +66,7 @@ public class AuthTeambitionRequest extends AuthDefaultRequest {
...
@@ -66,7 +66,7 @@ public class AuthTeambitionRequest extends AuthDefaultRequest {
.
blog
(
object
.
getString
(
"website"
))
.
blog
(
object
.
getString
(
"website"
))
.
location
(
object
.
getString
(
"location"
))
.
location
(
object
.
getString
(
"location"
))
.
email
(
object
.
getString
(
"email"
))
.
email
(
object
.
getString
(
"email"
))
.
gender
(
AuthUserGender
.
UNKNOW
)
.
gender
(
AuthUserGender
.
UNKNOW
N
)
.
token
(
authToken
)
.
token
(
authToken
)
.
source
(
AuthSource
.
TEAMBITION
)
.
source
(
AuthSource
.
TEAMBITION
)
.
build
();
.
build
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录