Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Open Source
>
Web Development
>
OAuth/SSO
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
1.1K
Star
10.5K
Fork
3.2K
GVP
yadong.zhang
/
JustAuth
Code
Issues
59
Pull Requests
4
Wiki
Insights
Pipelines
Service
JavaDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
27
获取三方实例 部分 进行重构,使之可以进行更简单的获取对应的实例。
Merged
陈宁:master
yadong.zhang:dev
陈宁
create on 2021-08-10 10:44
Clone/Download
HTTPS
SSH
Copy
Email Patch
Diff file
对生成三方处理实例 部分进行重构, 提供统一生成实例入口,不需要从调用端 做对应的 new 操作. 调用端只需要 给定对应的 source 编码 和 对应的 自定义配置 就可以得到正确的处理类. 重构后调用方式如下: AuthRequest request = AuthDefaultSource.getAuthSource("dingtalk").getAuthRequestInstance(AuthConfig.builder() .clientId("a") .clientSecret("a") .redirectUri("https://www.justauth.cn") .build()); 该方式调用端只需关心对应的 source 码 还有对应的 自定义配置即可. 推荐更新后,将文档也改为采用上面方式来调用. 为兼容历史,之前的调用方式依然可用不受影响: switch (source.toLowerCase()) { case "dingtalk": authRequest = new AuthDingTalkRequest(AuthConfig.builder() .clientId("") .clientSecret("") .redirectUri("http://localhost:8443/oauth/callback/dingtalk") .build()); break; case "baidu": authRequest = new AuthBaiduRequest(AuthConfig.builder() .clientId("") .clientSecret("") .redirectUri("http://localhost:8443/oauth/callback/baidu") .scopes(Arrays.asList( AuthBaiduScope.BASIC.getScope(), AuthBaiduScope.SUPER_MSG.getScope(), AuthBaiduScope.NETDISK.getScope() )) .build()); break; } 最后说下,代码格式化问题,由于不太清楚你们设定的格式化规范,我这边无法做到完全的一致格式化. 还请大佬合并后帮忙再统一格式化下.
This pull request needs to pass some approval items
Type
Assign personnel
Status
Reviewer
yadong.zhang
Pass review
Completed
(1/1 )
Tester
yadong.zhang
Pass test
Completed
(1/1 )
How to merge Pull Request
git checkout dev
git pull https://gitee.com/ngcly/JustAuth.git master
git push origin dev
Comments
5
Commits
6
Files
4
Checks
Code problems
0
Bulk operation
Expand
Collapse
Reviewer
Code Owner
Reviewer
lengleng
log4j
smallwei
smallweigit
smallchill
smallc
李寻欢
best_lxh
Javen
javen205
stylefeng
stylefeng
yadong.zhang
yadong.zhang
No Setting
Min number
1
Tester
lengleng
log4j
smallwei
smallweigit
smallchill
smallc
李寻欢
best_lxh
Javen
javen205
stylefeng
stylefeng
yadong.zhang
yadong.zhang
No Setting
Min number
1
Priority
Not specified
Serious
Main
Secondary
Unimportant
Label
Label settings
No Setting
Link Issue
No link issue
Successfully merged pull requests will close issues
Milestone
No related milestones
Participators
(2)
Java
1
https://gitee.com/yadong.zhang/JustAuth.git
git@gitee.com:yadong.zhang/JustAuth.git
yadong.zhang
JustAuth
JustAuth
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register