Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wds12580
JustAuth
提交
67c668b7
J
JustAuth
项目概览
wds12580
/
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,发现更多精彩内容 >>
提交
67c668b7
编写于
7月 16, 2019
作者:
智布道
👁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
♻
authorize方法提到父类中
上级
7fe8a4d4
变更
21
显示空白变更内容
内联
并排
Showing
21 changed file
with
6 addition
and
261 deletion
+6
-261
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java
src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java
src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
...main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java
src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthTencentCloudRequest.java
...n/java/me/zhyd/oauth/request/AuthTencentCloudRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java
src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java
src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java
+0
-13
src/main/java/me/zhyd/oauth/request/BaseAuthRequest.java
src/main/java/me/zhyd/oauth/request/BaseAuthRequest.java
+6
-1
未找到文件。
src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
浏览文件 @
67c668b7
...
...
@@ -15,7 +15,6 @@ import me.zhyd.oauth.model.AuthToken;
import
me.zhyd.oauth.model.AuthUser
;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.AlipayUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.utils.StringUtils
;
/**
...
...
@@ -86,16 +85,4 @@ public class AuthAlipayRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
ALIPAY
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java
浏览文件 @
67c668b7
...
...
@@ -10,7 +10,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.BaiduUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRevokeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
...
...
@@ -69,18 +68,6 @@ public class AuthBaiduRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
@Override
public
AuthResponse
revoke
(
AuthToken
authToken
)
{
String
accessToken
=
authToken
.
getAccessToken
();
...
...
src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.CodingUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -73,16 +72,4 @@ public class AuthCodingRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
CODING
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.CsdnUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -63,16 +62,4 @@ public class AuthCsdnRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
CSDN
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
浏览文件 @
67c668b7
...
...
@@ -13,7 +13,6 @@ import me.zhyd.oauth.model.AuthToken;
import
me.zhyd.oauth.model.AuthUser
;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.DingtalkUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
import
me.zhyd.oauth.utils.GlobalAuthUtil
;
...
...
@@ -69,16 +68,4 @@ public class AuthDingTalkRequest extends BaseAuthRequest {
.
token
(
token
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
浏览文件 @
67c668b7
...
...
@@ -9,7 +9,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.DouyinUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRefreshTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
...
...
@@ -61,18 +60,6 @@ public class AuthDouyinRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
@Override
public
AuthResponse
refresh
(
AuthToken
oldToken
)
{
String
refreshTokenUrl
=
this
.
urlBuilder
.
getRefreshUrl
(
AuthRefreshTokenEntity
.
builder
()
...
...
src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.FacebookUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -79,16 +78,4 @@ public class AuthFacebookRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
FACEBOOK
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.GiteeUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -65,16 +64,4 @@ public class AuthGiteeRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
GITEE
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.GithubUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
import
me.zhyd.oauth.utils.GlobalAuthUtil
;
...
...
@@ -68,16 +67,4 @@ public class AuthGithubRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
GITHUB
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.GoogleUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -71,16 +70,4 @@ public class AuthGoogleRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
GOOGLE
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
浏览文件 @
67c668b7
...
...
@@ -10,7 +10,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.LinkedinUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRefreshTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
import
me.zhyd.oauth.utils.StringUtils
;
...
...
@@ -92,18 +91,6 @@ public class AuthLinkedinRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
private
String
getUserEmail
(
String
accessToken
)
{
String
email
=
null
;
HttpResponse
emailResponse
=
HttpRequest
.
get
(
"https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))"
)
...
...
src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
浏览文件 @
67c668b7
...
...
@@ -10,7 +10,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.MiUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRefreshTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
...
...
@@ -101,18 +100,6 @@ public class AuthMiRequest extends BaseAuthRequest {
return
authUser
;
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
/**
* 刷新access token (续期)
*
...
...
src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
浏览文件 @
67c668b7
...
...
@@ -10,7 +10,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.MicrosoftUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRefreshTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
...
...
@@ -95,18 +94,6 @@ public class AuthMicrosoftRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
/**
* 刷新access token (续期)
*
...
...
src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.OschinaUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -70,16 +69,4 @@ public class AuthOschinaRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
OSCHINA
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
浏览文件 @
67c668b7
...
...
@@ -13,7 +13,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.QqUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
import
me.zhyd.oauth.utils.GlobalAuthUtil
;
import
me.zhyd.oauth.utils.StringUtils
;
...
...
@@ -83,18 +82,6 @@ public class AuthQqRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
private
String
getOpenId
(
AuthToken
authToken
)
{
String
accessToken
=
authToken
.
getAccessToken
();
HttpResponse
response
=
HttpRequest
.
get
(
this
.
urlBuilder
.
getOpenIdUrl
(
accessToken
,
config
.
isUnionId
())).
execute
();
...
...
src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.TaobaoUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.utils.GlobalAuthUtil
;
/**
...
...
@@ -60,16 +59,4 @@ public class AuthTaobaoRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
TAOBAO
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthTencentCloudRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.TencentCloudUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -72,16 +71,4 @@ public class AuthTencentCloudRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
TENCENT_CLOUD
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java
浏览文件 @
67c668b7
...
...
@@ -13,7 +13,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.ToutiaoUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
/**
...
...
@@ -78,16 +77,4 @@ public class AuthToutiaoRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
TOUTIAO
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/AuthWeChatRequest.java
浏览文件 @
67c668b7
...
...
@@ -9,7 +9,6 @@ import me.zhyd.oauth.exception.AuthException;
import
me.zhyd.oauth.model.*
;
import
me.zhyd.oauth.url.WechatUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthRefreshTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
...
...
@@ -66,18 +65,6 @@ public class AuthWeChatRequest extends BaseAuthRequest {
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
@Override
public
AuthResponse
refresh
(
AuthToken
oldToken
)
{
String
refreshTokenUrl
=
this
.
urlBuilder
.
getRefreshUrl
(
AuthRefreshTokenEntity
.
builder
()
...
...
src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java
浏览文件 @
67c668b7
...
...
@@ -12,7 +12,6 @@ import me.zhyd.oauth.model.AuthUser;
import
me.zhyd.oauth.model.AuthUserGender
;
import
me.zhyd.oauth.url.WeiboUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAccessTokenEntity
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.url.entity.AuthUserInfoEntity
;
import
me.zhyd.oauth.utils.IpUtils
;
import
me.zhyd.oauth.utils.StringUtils
;
...
...
@@ -81,16 +80,4 @@ public class AuthWeiboRequest extends BaseAuthRequest {
.
source
(
AuthSource
.
WEIBO
)
.
build
();
}
/**
* 返回认证url,可自行跳转页面
*
* @return 返回授权地址
*/
@Override
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
src/main/java/me/zhyd/oauth/request/BaseAuthRequest.java
浏览文件 @
67c668b7
...
...
@@ -9,6 +9,7 @@ import me.zhyd.oauth.model.AuthResponse;
import
me.zhyd.oauth.model.AuthToken
;
import
me.zhyd.oauth.model.AuthUser
;
import
me.zhyd.oauth.url.AbstractUrlBuilder
;
import
me.zhyd.oauth.url.entity.AuthAuthorizeEntity
;
import
me.zhyd.oauth.utils.AuthChecker
;
/**
...
...
@@ -69,5 +70,9 @@ public abstract class BaseAuthRequest implements AuthRequest {
* @return 返回授权地址
*/
@Override
public
abstract
String
authorize
();
public
String
authorize
()
{
return
this
.
urlBuilder
.
getAuthorizeUrl
(
AuthAuthorizeEntity
.
builder
()
.
config
(
config
)
.
build
());
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录