Compare commits
220 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02674049d0 | |||
| f1714726f5 | |||
| a3108caccf | |||
| e134dd06b0 | |||
| 172ba7be55 | |||
| f9e3053ecc | |||
| 99c9ba2854 | |||
| 544ffd5372 | |||
| 522ebbfa7f | |||
| 497498dbf4 | |||
| 62cd7af619 | |||
| 3a3f69692c | |||
| c87015e34f | |||
| 96773dd92d | |||
| 644ef02264 | |||
| 4c205a9957 | |||
| ea70c5fc81 | |||
| 9ced525309 | |||
| 2de0ad5013 | |||
| 23b7bcf43d | |||
| 976b7d8b2b | |||
| 80132b69e7 | |||
| 95158654a9 | |||
| f2e609192a | |||
| 8c8f7a27a2 | |||
| 8283124c57 | |||
| 39b113b194 | |||
| e45ef2ec31 | |||
| d114368a0d | |||
| 0047cde50e | |||
| f2c1c0f8a6 | |||
| 21e23aadb9 | |||
| db3f7da181 | |||
| 004e5a180f | |||
| 50c31e5dea | |||
| 7d6049da67 | |||
| 9a24553acd | |||
| d75d91db0d | |||
| e1a4688ac0 | |||
| b1d3790ae1 | |||
| e5548b0173 | |||
| ebf39627dd | |||
| 74ee17b242 | |||
| b77de0bd0c | |||
| e55033f4f5 | |||
| 37b7784f89 | |||
| 7cdc719166 | |||
| 5073f82897 | |||
| 9971793f0c | |||
| 9fc3131640 | |||
| 3f4436bcb6 | |||
| 0678202baa | |||
| af8fda700b | |||
| 881a87ed95 | |||
| 4c8fdbae49 | |||
| e8db2dd282 | |||
| 90374762e4 | |||
| e5d44e91b8 | |||
| 41559fc954 | |||
| d354278e7d | |||
| c2d6661a76 | |||
| 5ee87760be | |||
| 94f6540338 | |||
| 7bc7a92efb | |||
| b5920872d5 | |||
| 0bdf881849 | |||
| 46f7c72744 | |||
| 4a662ba5cd | |||
| 040587d5b2 | |||
| c81411fd39 | |||
| 0e1b000bd8 | |||
| f9b30c735b | |||
| 0f42457d91 | |||
| fa75568996 | |||
| f44ceeeeeb | |||
| ec4c009ed8 | |||
| 03fbbe0d3a | |||
| e64e9def63 | |||
| 25f99f7560 | |||
| 0433f54564 | |||
| 423d9f45b6 | |||
| 7a9e6214de | |||
| 3753e3b9bc | |||
| bc3af96328 | |||
| b700902c04 | |||
| 2d0ae7cc27 | |||
| 3e4faa75fe | |||
| 6a36ad6af2 | |||
| 13514d6a92 | |||
| 6a479d9c1d | |||
| 2e64fb9693 | |||
| 0e8308e6c9 | |||
| 3933b3b7ee | |||
| a99b818810 | |||
| cd324cc7c1 | |||
| 3e890f2c2a | |||
| ba56f5ab5a | |||
| 132a7f4338 | |||
| c79b97a0d0 | |||
| 66df3ac027 | |||
| 11df93ad44 | |||
| e3f5f49ec8 | |||
| 23eb2cfcc8 | |||
| 30461e62f9 | |||
| dfbbd9ae0d | |||
| 05b7746f26 | |||
| 21422b02aa | |||
| 10e445e87c | |||
| d6cbcecaab | |||
| 050459e616 | |||
| 9fd2b9b919 | |||
| 2ff5570399 | |||
| 1bec384525 | |||
| 824c68356d | |||
| f5e3c225f6 | |||
| 0259669288 | |||
| edc9d1a3c3 | |||
| d886bc95a2 | |||
| 7aaf52e953 | |||
| e84bd7cdb5 | |||
| 28e19960f2 | |||
| dce2bd1e1e | |||
| bc30971482 | |||
| 9bd6d88049 | |||
| 442332be57 | |||
| d4bfa8e75f | |||
| fb90fbdcb8 | |||
| 5f6cb2954f | |||
| 906ae659a2 | |||
| cebfd99703 | |||
| 71b6080156 | |||
| 492ffdbbf8 | |||
| dc4093bdf3 | |||
| b71b081c96 | |||
| 6b00783cd9 | |||
| 2723f0dc3d | |||
| abbfb73337 | |||
| 960892eec3 | |||
| 4a6216f7d9 | |||
| ce689362ac | |||
| e39d1dd0f8 | |||
| f5f1b1ccc0 | |||
| d4104dd124 | |||
| c17e56865b | |||
| 8b55195225 | |||
| 0398698657 | |||
| e15ecbe91e | |||
| 9c332d6d16 | |||
| d645224071 | |||
| 272d1ac8a0 | |||
| 162a16820d | |||
| 2abef3dc64 | |||
| e9fa31bc0d | |||
| 753774b193 | |||
| b01ebcaf48 | |||
| 45e1195974 | |||
| 72bb1d826f | |||
| a85d9797a7 | |||
| 6354182335 | |||
| df11fcbd4c | |||
| 36d4f89595 | |||
| d787ba7346 | |||
| 2d52e010da | |||
| 8440b0606e | |||
| cb30ddfa2f | |||
| a1ceb9bc7e | |||
| 7df2c9af23 | |||
| f2c1c2f0ee | |||
| cc04c1b616 | |||
| e02fcf895f | |||
| d338e1bb98 | |||
| e11b8aff09 | |||
| 6defde8283 | |||
| 8b3bc42678 | |||
| 164e12de1f | |||
| 369388c11d | |||
| a1200b2510 | |||
| 6ea1d41211 | |||
| ddde4ef1f5 | |||
| 26884f7218 | |||
| 7f9c12d5bf | |||
| fbeb4c68ab | |||
| 179287f720 | |||
| 8a47735208 | |||
| 0feb859f68 | |||
| 441dda3970 | |||
| b564ce8a89 | |||
| 5e0065508a | |||
| cf6f42b586 | |||
| 89b5fe4543 | |||
| 6f313fa91a | |||
| 36bcebdd46 | |||
| 99b8680fd2 | |||
| 2717d9cf7a | |||
| 166ddffaf4 | |||
| 33385fd30a | |||
| 8e5a679129 | |||
| 5ab2e87157 | |||
| c34e226a54 | |||
| e4985c63f3 | |||
| e93ad07c5f | |||
| 4ca1f46722 | |||
| 571c3438e4 | |||
| 2497519ec1 | |||
| 278a435cdb | |||
| e75df92080 | |||
| 9e6a4c61b0 | |||
| d355699cc3 | |||
| 28466f8ab5 | |||
| c6bd5d9e5d | |||
| d0ae0f2c7a | |||
| 521a423e26 | |||
| 1f1d61fe4e | |||
| ec87ea145c | |||
| b1121ba545 | |||
| 41d0d01329 | |||
| 77603cf7db | |||
| 7be51f1d33 | |||
| e71af6b2e6 | |||
| 54779ab26a |
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://justauth.wiki/sponsor.html']
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report template
|
||||
about: Please use this template for reporting suspected bugs.
|
||||
title: 'bug:'
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Pre-submission checklist:
|
||||
|
||||
- [ ] I have searched the relevant information in the existing list of Issues.
|
||||
- [ ] I have searched the developer documentation for that information: https://justauth.wiki
|
||||
- [ ] I have read the relevant Q&A: https://justauth.wiki
|
||||
|
||||
## Issue description
|
||||
|
||||
## Environment
|
||||
|
||||
- JustAuth version(e.g. `1.15.1`):
|
||||
|
||||
### Minimal test code / Steps to reproduce the issue
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
## What's the actual result? (including assertion message & call stack if applicable)
|
||||
|
||||
> Be sure to provide a complete and detailed exception stack.
|
||||
|
||||
|
||||
## What's the expected result?
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Please use this template for describing new features.
|
||||
title: 'feat: '
|
||||
labels: 'Feature Request'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## Why did you add this feature?
|
||||
|
||||
## Feature description
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Request help template
|
||||
about: Please use this template for requesting help.
|
||||
title: 'request help:'
|
||||
labels: 'question'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
## Issue description
|
||||
|
||||
## Environment
|
||||
|
||||
- JustAuth version(e.g. `1.15.1`):
|
||||
@@ -0,0 +1,13 @@
|
||||
## What this PR does / why we need it:
|
||||
|
||||
|
||||
## Pre-submission checklist:
|
||||
- [ ] Did you explain what problem does this PR solve?
|
||||
- [ ] What new features have been added?
|
||||
- [ ] Have you added corresponding test cases?
|
||||
- [ ] Have you modified the corresponding document?
|
||||
- [ ] Is this PR backward compatible?
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
paths:
|
||||
- src/**
|
||||
- pom.xml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
- name: Set up Java and Maven
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'zulu'
|
||||
- name: Cache m2 package
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- run: mvn test
|
||||
|
||||
deploy-snapshot:
|
||||
needs: test
|
||||
if: ${{ success() }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
- name: Set up Java and Maven
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'zulu'
|
||||
server-id: ossrh
|
||||
server-username: MAVEN_USERNAME
|
||||
server-password: MAVEN_PASSWORD
|
||||
- name: Cache m2 package
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: setting snapshot version
|
||||
run: |
|
||||
import xml.etree.ElementTree as ET
|
||||
tree = ET.parse("pom.xml")
|
||||
version = tree.find("{http://maven.apache.org/POM/4.0.0}version")
|
||||
print(version.text + "-SNAPSHOT")
|
||||
if version.text.endswith("-SNAPSHOT") == False:
|
||||
tree.find("{http://maven.apache.org/POM/4.0.0}version").text = version.text + "-SNAPSHOT"
|
||||
ET.register_namespace("", "http://maven.apache.org/POM/4.0.0")
|
||||
tree.write("pom.xml", "utf-8", True)
|
||||
shell: python
|
||||
- name: deploy snapshot to ossrh repository
|
||||
run: mvn -B deploy -P snapshot -DskipTests
|
||||
env:
|
||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
||||
@@ -0,0 +1,26 @@
|
||||
name: test pull_request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- src/**
|
||||
- pom.xml
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.2.0
|
||||
- name: Set up Java and Maven
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'zulu'
|
||||
- name: Cache m2 package
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- run: mvn test
|
||||
@@ -28,9 +28,8 @@ hs_err_pid*
|
||||
bin/codecov.sh
|
||||
bin/deploy.sh
|
||||
bin/docsify-cli.sh
|
||||
bin/push.sh
|
||||
bin/push-dev.sh
|
||||
|
||||
target
|
||||
/pom.xml.versionsBackup
|
||||
/gpg
|
||||
/PLAN.md
|
||||
|
||||
@@ -1,3 +1,266 @@
|
||||
## 1.16.5
|
||||
|
||||
### 2021/10/18
|
||||
|
||||
- 合并 PR [Github #138](https://github.com/justauth/JustAuth/pull/138)
|
||||
- 升级alipay-sdk-version的依赖版本
|
||||
- 修改用户logo的尺寸
|
||||
- 修复 alipay 登录失败的 BUG [Gitee Issue #I4E4ML](https://gitee.com/yadong.zhang/JustAuth/issues/I4E4ML)
|
||||
|
||||
|
||||
## 1.16.4
|
||||
|
||||
### 2021/9/22
|
||||
|
||||
- 合并 PR
|
||||
- [Github #134](https://github.com/justauth/JustAuth/pull/134)
|
||||
- [Github #133](https://github.com/justauth/JustAuth/pull/133)
|
||||
- [Github #132](https://github.com/justauth/JustAuth/pull/132)
|
||||
- [Github #131](https://github.com/justauth/JustAuth/pull/131)
|
||||
- 添加微软中国(世纪华联)第三方登录,新增微软方式登录的redirectUri校验。[Gitee PR #28](https://gitee.com/yadong.zhang/JustAuth/pulls/28)
|
||||
- 升级第三方的依赖
|
||||
- simple-http > 1.0.5
|
||||
- lombok > 1.18.20
|
||||
- junit > 4.13.2
|
||||
- fastjson > 1.2.78
|
||||
- alipay-sdk > 4.16.38.ALL
|
||||
|
||||
## 1.16.3
|
||||
|
||||
### 2021/8/15
|
||||
|
||||
- 发布 v1.16.3
|
||||
- 新增
|
||||
- 集成“企业微信的第三方应用”平台登录
|
||||
- PR
|
||||
- `AuthRequst` 增加 `Builder` 构建方式,使用起来更简单。 ([#27](https://gitee.com/yadong.zhang/JustAuth/pulls/27))
|
||||
- 使用 Github Action 添加发布快照的 workflow。 ([#126](https://github.com/justauth/JustAuth/pull/126))
|
||||
- 新增了企业微信的第三方应用登录,`AuthWeChatEnterpriseThirdQrcodeRequest`。 ([#127](https://github.com/justauth/JustAuth/pull/127))
|
||||
- 添加快照版本对应更详细的文档。 ([#128](https://github.com/justauth/JustAuth/pull/128))
|
||||
- 修改
|
||||
- 在 Gitee PR ([#27](https://gitee.com/yadong.zhang/JustAuth/pulls/27)) 的基础上重构代码,增加 Builder 方式创建 AuthRequest
|
||||
- 解决 Line 登录的错误。[#122](https://github.com/justauth/JustAuth/issues/122)
|
||||
|
||||
|
||||
## 1.16.2
|
||||
|
||||
### 2021/7/28
|
||||
|
||||
- 发布 v1.16.2
|
||||
- 新增
|
||||
- 集成“程序员客栈”平台登录
|
||||
- 修改
|
||||
- 更新文档
|
||||
- 修复“淘宝”平台授权登录后没有`uid`的问题、增加刷新token的功能
|
||||
- 修复“Twitter”平台授权登录后获取不到用户邮箱的问题
|
||||
|
||||
## 1.16.1
|
||||
|
||||
### 2021/4/19
|
||||
|
||||
- 发布 v1.16.1
|
||||
- Fix Github issue [#114](https://github.com/justauth/JustAuth/issues/114): 解决企业微信授权后,回调地址中原有的参数丢失的问题
|
||||
- Fix Github issue [#82](https://github.com/justauth/JustAuth/issues/82): 抖音平台支持自定义 scope
|
||||
- Fix Github issue [#92](https://github.com/justauth/JustAuth/issues/92): 增加忽略校验 redirectUri 的配置
|
||||
- Merge Github PR [#115](https://github.com/justauth/JustAuth/pull/115)
|
||||
- 升级 `fastjson` 到 `v1.2.76`
|
||||
|
||||
## 1.16.0
|
||||
|
||||
### 2021/4/7
|
||||
|
||||
- 发布 v1.16.0
|
||||
- 新增
|
||||
- 集成 Amazon 平台登录
|
||||
- 集成 Slack 平台登录
|
||||
- 集成 LINE 平台登录
|
||||
- 集成 Okta 平台登录
|
||||
- 集成钉钉账号登录
|
||||
- 修改
|
||||
- 【**重要**】 `AuthConfig`中的`codingGroupName`参数更名为`domainPrefix`,针对此类平台提供通用的配置。
|
||||
- 修改 `AuthFacebookScope` 中的默认 scope,解决 justauth-demo 项目中使用 facebook 报错的问题
|
||||
- 升级 facebook 的 api 到 v10.0 版本
|
||||
- 优化部分代码
|
||||
- 优化 Map 声明时的初始容量,避免频繁扩容
|
||||
- 更新 README 文档
|
||||
- PR
|
||||
- 合并 [Github #110](https://github.com/justauth/JustAuth/pull/110)
|
||||
- 合并 [Gitee #22](https://gitee.com/yadong.zhang/JustAuth/pulls/22)
|
||||
|
||||
## 1.15.9
|
||||
|
||||
### 2021/1/1
|
||||
|
||||
- 发布 v1.15.9
|
||||
- 新增
|
||||
- 修复并正式启用 飞书 平台的第三方登录
|
||||
- AuthToken 类中新增 `refreshTokenExpireIn` 记录 refresh token 的有效期
|
||||
- PR
|
||||
- 合并 [Github #101](https://github.com/justauth/JustAuth/pull/101) :支持喜马拉雅登录
|
||||
- 合并 [Github #105](https://github.com/justauth/JustAuth/pull/105) :支持企业微信网页授权登录
|
||||
- 合并 [Github #107](https://github.com/justauth/JustAuth/pull/107) :添加AuthAlipayRequest网络代理构造器,解决 Github Issue [#102](https://github.com/justauth/JustAuth/issues/102)
|
||||
- 修改
|
||||
- 修改喜马拉雅配置参数,将`ClientOsType`参数提到 AuthConfig 中
|
||||
- AuthChecker 中增加对喜马拉雅平台的校验
|
||||
- 升级 facebook api 版本到 v9.0,解决 Gitee Issue [#I2AR5S](https://gitee.com/yadong.zhang/JustAuth/issues/I2AR5S)
|
||||
- !!!**注意**!!!修改原来的企业微信 Request 类名为 `AuthWeChatEnterpriseQrcodeRequest`,升级后注意该点
|
||||
|
||||
注意:可能有些开发者对于 JA 集成的四个微信平台不太理解,这儿统一说明:
|
||||
- 按照类名
|
||||
- AuthWeChatEnterpriseQrcodeRequest:企业微信二维码登录
|
||||
- AuthWeChatEnterpriseWebRequest:企业微信网页登录
|
||||
- AuthWeChatOpenRequest:微信开放平台
|
||||
- AuthWeChatMpRequest:微信公众平台
|
||||
- 按照枚举
|
||||
- WECHAT_ENTERPRISE:企业微信二维码登录
|
||||
- WECHAT_ENTERPRISE_WEB:企业微信网页登录
|
||||
- WECHAT_OPEN:微信开放平台
|
||||
- WECHAT_MP:微信公众平台
|
||||
|
||||
## 1.15.8
|
||||
|
||||
### 2020/10/25
|
||||
|
||||
- Release version 1.15.8
|
||||
- Merge the pr. [#95](https://github.com/justauth/JustAuth/pull/95) [#96](https://github.com/justauth/JustAuth/pull/96)
|
||||
|
||||
## 1.15.7
|
||||
|
||||
### 2020/09/11
|
||||
|
||||
- Release version 1.15.7
|
||||
- Upgrade the use of access token when obtaining resources on the github platform.Reference from [Deprecating API authentication through query parameters](https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/)
|
||||
- Fixed issue. [#89](https://github.com/justauth/JustAuth/issues/89)
|
||||
|
||||
## 1.15.7-beta.3
|
||||
|
||||
### 2020/08/24
|
||||
|
||||
- Fixing a bug for wechat.
|
||||
- Improve the Microsoft platform's questions about scope.
|
||||
|
||||
## 1.15.7-beta.1
|
||||
|
||||
### 2020/08/05
|
||||
|
||||
- 新增
|
||||
- 以下平台支持自定义 Scope 参数:百度、coding、Facebook、gitee、github、gitlab、google、华为、京东·宙斯、酷家乐、领英、微软、小米、Pinterest、QQ、人人网、StackOverflow、微博、微信公众平台
|
||||
- 添加 PR 和 ISSUE 规范和 CODE_OF_CONDUCT 文档
|
||||
- 合并
|
||||
- 合并 Gitee [PR#19](https://gitee.com/yadong.zhang/JustAuth/pulls/19),修复通过google登录一次后,重新用google登录无法切换谷歌账户的问题。
|
||||
|
||||
## 1.15.6
|
||||
|
||||
### 2020/06/30
|
||||
- 文档
|
||||
- 新增 [百度登录](oauth/baidu.md)文档
|
||||
- 新增 [钉钉登录](oauth/alipay.md)文档
|
||||
- 新增 [开源中国登录](contributors.md)文档
|
||||
- 新增 [领英登录](references.md)文档
|
||||
- 新增 [Google 登录](references.md)文档
|
||||
- 新增 [微信企业版登录](oauth/wechatEnterprise.md)文档
|
||||
- 新增 [Facebook 登录](oauth/facebook.md)文档
|
||||
- 完善 [JustAuth 使用者](users.md)文档
|
||||
- 替换“帮助文档”域名,由[https://docs.justauth.whnb.wang](https://docs.justauth.whnb.wang)迁移到[https://justauth.wiki](https://justauth.wiki)
|
||||
- 新增
|
||||
- 增加阿里云授权登录中刷新授权token的接口,by “QQ群用户需求”
|
||||
- AuthConfig 增加忽略校验 state 的参数,详情参考:[Github#Issue#83](https://github.com/justauth/JustAuth/issues/83)
|
||||
- 移除领英刷新token的接口。参考官网:`To refresh an access token, go through the authorization process again to fetch a new token.`
|
||||
|
||||
## 1.15.5
|
||||
### 2020/06/24
|
||||
- BUG
|
||||
- 解决 `Microsoft` 授权失败的 BUG
|
||||
- 解决 `Coding` 个人账号授权失败的 BUG(目前只能使用团队模式进行授权,需要传入团队名,参考`AuthConfig#codingGroupName`)
|
||||
- 解决 `AuthLinkedinRequest#getAvatar` NPE 的问题。(领英用户没有头像时,原代码会报 NPE)
|
||||
- 解决抖音登录获取用户地址异常的问题。
|
||||
- 解决人人网登录时 token 中带有 `|` 引起的异常,[Gitee!15](https://gitee.com/yadong.zhang/JustAuth/pulls/15)
|
||||
- 新增
|
||||
- 支持阿里云授权登录,[Github#81](https://github.com/justauth/JustAuth/pull/81)
|
||||
- AuthUser 中新增 `rawUserInfo`,用来存放第三方平台返回的原始用户数据。注:淘宝平台的`rawUserInfo`为一个空 JSON
|
||||
- 支持 Http 级的代理配置,使用方式:
|
||||
```java
|
||||
new AuthGoogleRequest(AuthConfig.builder()
|
||||
.clientId("")
|
||||
.clientSecret("")
|
||||
.redirectUri("http://127.0.0.1:8443/oauth/callback/google")
|
||||
// 针对国外平台配置代理
|
||||
.httpConfig(HttpConfig.builder()
|
||||
.timeout(15000)
|
||||
.proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 10080)))
|
||||
.build())
|
||||
.build());
|
||||
```
|
||||
- 修改
|
||||
- 升级 [simple-http](https://github.com/xkcoding/simple-http) 到 `v1.0.2`
|
||||
- 升级 `fastjson` 到 `v1.2.71`
|
||||
- 删除
|
||||
- :boom: 删除**腾讯云登录**。coding 已并入 腾讯云,因此只保留 coding 登录 :boom:
|
||||
- 文档
|
||||
- 新增 [Coding登录](oauth/coding.md)文档
|
||||
- 完善 [支付宝登录](oauth/alipay.md)文档
|
||||
- 完善 [贡献者名单](contributors.md)文档
|
||||
- 完善 [参考文档](references.md)文档
|
||||
- PR
|
||||
- 合并 [Gitee!17](https://gitee.com/yadong.zhang/JustAuth/pulls/17)
|
||||
- 合并 [Gitee!15](https://gitee.com/yadong.zhang/JustAuth/pulls/15)
|
||||
- 合并 [Github#81](https://github.com/justauth/JustAuth/pull/81)
|
||||
- Issues
|
||||
- 解决 [Github#80](https://github.com/justauth/JustAuth/issues/80)
|
||||
- 解决 [Github#75](https://github.com/justauth/JustAuth/issues/75)
|
||||
|
||||
## 1.15.4-alpha
|
||||
### 2020/05/13
|
||||
- 修复
|
||||
- 解决 Twitter 授权失败的BUG
|
||||
- 文档
|
||||
- 完善 [https://justauth.wiki](https://justauth.wiki/) 的404引导页内容
|
||||
- 增加名词解释: `uuid`
|
||||
- 补充 [Q&A](Q&A.md)
|
||||
- 新增 [参考文档](references.md),包含 OAuth 授权和第三方平台的API文档等内容
|
||||
- 新增 [推特登录](oauth/twitter.md) 的说明文档
|
||||
|
||||
> 特别注意:所有国外平台都无法直接通过java进行访问API,目前[simple-http](https://github.com/xkcoding/simple-http) Release版本,暂不支持添加代理,所以目前需要手动开启代理。
|
||||
|
||||
代理开启的方式:
|
||||
```java
|
||||
System.setProperty("proxyPort", "10080");
|
||||
System.setProperty("proxyHost", "127.0.0.1");
|
||||
```
|
||||
以上代码可以在声明 `AuthRequest` 时创建,也可以全局执行。
|
||||
|
||||
本地如果支持科学上网,就用自己本地的代理端口即可,如果不支持科学上网,可以去网上找一些免费的代理IP进行测试(请自行操作)。
|
||||
|
||||
|
||||
## 1.15.2-alpha
|
||||
### 2020/05/10
|
||||
- 修改
|
||||
- 修复使用领英登录时无法获取token的问题
|
||||
- 解决Gitee [Issue-I1GPIB](https://gitee.com/yadong.zhang/JustAuth/issues/I1GPIB)
|
||||
|
||||
【声明】:当引用 OkHttp 时,无法调用领英的授权登录,可能会抛出 400 异常。如遇此问题,请先切换到 hutool 或者 httpclient 依赖。
|
||||
该问题尚在修复中,给各位带来的不便,深表歉意。
|
||||
|
||||
- hutool-http
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>5.2.5</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
- httpclient
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.12</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## v1.15.1(~~v1.15.0~~)
|
||||
### 2020/04/10
|
||||
- 修改
|
||||
@@ -31,9 +294,9 @@
|
||||
- 新增
|
||||
- 增加微信、QQ、支付宝、微博授权登录的帮助文档
|
||||
- 合并[PR#57](https://github.com/justauth/JustAuth/pull/57),增加微信公众号登录 by [@xkcoding](https://github.com/xkcoding)
|
||||
- [帮助文档](https://docs.justauth.whnb.wang)中增加自定义的404页面
|
||||
- [帮助文档](https://docs.justauth.whnb.wang)中增加Gittalk插件
|
||||
- [帮助文档](https://docs.justauth.whnb.wang)中增加Java代码高亮的插件
|
||||
- [帮助文档](https://justauth.wiki)中增加自定义的404页面
|
||||
- [帮助文档](https://justauth.wiki)中增加Gittalk插件
|
||||
- [帮助文档](https://justauth.wiki)中增加Java代码高亮的插件
|
||||
- 增加`AuthUserGender#getWechatRealGender`方法,兼容获取微信平台的用户性别
|
||||
- 修改
|
||||
- 修复抖音登录取值取错层级的问题([issue#I15SIG@Gitee](https://gitee.com/yadong.zhang/JustAuth/issues/I15SIG))
|
||||
@@ -42,7 +305,7 @@
|
||||
- `AuthResponseStatus`枚举类中增加`ILLEGAL_STATUS`、`REQUIRED_REFRESH_TOKEN`两个枚举值
|
||||
- `AuthSource`接口中增加`getName`方法,用来对外提供实际`source`的字符串值
|
||||
- `AuthWeiboRequest`微博授权登录中实现`revoke`方法,支持手动回收授权
|
||||
- [帮助文档](https://docs.justauth.whnb.wang)中修复[腾讯云登录]链接错误的问题
|
||||
- [帮助文档](https://justauth.wiki)中修复[腾讯云登录]链接错误的问题
|
||||
- 升级
|
||||
- 升级相关依赖:lombok@v1.18.10,hutool@5.0.5,fastjson@1.2.62,alipay@4.8.10.ALL([PR#11@Gitee](https://gitee.com/yadong.zhang/JustAuth/pulls/11))
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at yadong.zhang0415@gmail.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
@@ -1,12 +1,15 @@
|
||||
<p align="center">
|
||||
<a href="https://docs.justauth.whnb.wang"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/Justauth.png" width="400"></a>
|
||||
<a href="https://justauth.wiki"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/Justauth.png" width="400"></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>Login, so easy.</strong>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://search.maven.org/search?q=JustAuth">
|
||||
<img src="https://img.shields.io/badge/Maven%20Central--1.15.1-blue" ></img>
|
||||
<img src="https://img.shields.io/github/v/release/justauth/JustAuth?style=flat-square" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://oss.sonatype.org/content/repositories/snapshots/me/zhyd/oauth/JustAuth/">
|
||||
<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/me.zhyd.oauth/JustAuth.svg?style=flat-square" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE">
|
||||
<img src="https://img.shields.io/apm/l/vim-mode.svg?color=yellow" ></img>
|
||||
@@ -14,65 +17,24 @@
|
||||
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://apidoc.gitee.com/yadong.zhang/JustAuth/" title="API文档">
|
||||
<img src="https://img.shields.io/badge/Api%20Docs--1.15.1-latest-orange" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://docs.justauth.whnb.wang" title="参考文档">
|
||||
<a target="_blank" href="https://justauth.wiki" title="参考文档">
|
||||
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/zhangyd-c/JustAuth">
|
||||
<img src="https://codecov.io/gh/zhangyd-c/JustAuth/branch/master/graph/badge.svg" />
|
||||
<a href="https://codecov.io/gh/justauth/JustAuth">
|
||||
<img src="https://codecov.io/gh/justauth/JustAuth/branch/master/graph/badge.svg?token=zYiAqd9aFz" />
|
||||
</a>
|
||||
<a href='https://gitee.com/yadong.zhang/JustAuth/stargazers'>
|
||||
<img src='https://gitee.com/yadong.zhang/JustAuth/badge/star.svg?theme=white' alt='star'></img>
|
||||
<img src='https://gitee.com/yadong.zhang/JustAuth/badge/star.svg?theme=gvp' alt='star'></img>
|
||||
</a>
|
||||
<a target="_blank" href='https://github.com/zhangyd-c/JustAuth'>
|
||||
<img src="https://img.shields.io/github/stars/zhangyd-c/JustAuth.svg?style=social" alt="github star"></img>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitee.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/github.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/weibo.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/dingtalk.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/baidu.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/coding.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/tencentCloud.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/oschina.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/alipay.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/qq.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信开放平台"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/taobao.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/google.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/facebook.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/douyin.png" width="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/linkedin.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/microsoft.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/mi.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/toutiao.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/teambition.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/renren.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/pinterest.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/stackoverflow.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/huawei.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信企业版"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/csdn.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/kujiale.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitlab.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/meituan.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/eleme.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/twitter.png" width="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><a href="https://docs.justauth.whnb.wang/#/?id=%E5%B7%B2%E9%9B%86%E6%88%90%E7%9A%84%E5%B9%B3%E5%8F%B0" target="_blank">查看更多</a></center>
|
||||
</center>
|
||||
-------------------------------------------------------------------------------
|
||||
<p align="center">
|
||||
<img src='./docs/media/75a3c076.png' alt='star'></img>
|
||||
</p>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,7 +43,7 @@
|
||||
`JustAuth`, as you see, It is just a Java library of third-party authorized login, It's smaller and easier to use. JustAuth is the best third-party login tool written in JAVA.
|
||||
|
||||
Source Code:[gitee](https://gitee.com/yadong.zhang/JustAuth) | [github](https://github.com/zhangyd-c/JustAuth)
|
||||
Docs:[Reference Doc](https://docs.justauth.whnb.wang)
|
||||
Docs:[Reference Doc](https://justauth.wiki)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -90,34 +52,28 @@ Docs:[Reference Doc](https://docs.justauth.whnb.wang)
|
||||
|
||||
## Quick start
|
||||
|
||||
- Add maven dependency
|
||||
### Add maven dependency
|
||||
|
||||
- Add JustAuth dependency
|
||||
|
||||
These artifacts are available from Maven Central:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>1.15.1</version>
|
||||
<version>{latest-version}</version>
|
||||
</dependency>
|
||||
```
|
||||
- Using JustAuth
|
||||
```java
|
||||
// Create authorization request
|
||||
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build());
|
||||
// Generate authorization url
|
||||
authRequest.authorize("state");
|
||||
// After authorization to login, it will return: code(auth_code(Alipay only)),state, After version 1.8.0, you can use the AuthCallback as a parameter to the callback interface
|
||||
// Note: JustAuth saves state for 3 minutes by default. If it is not used within 3 minutes, the expired state will be cleared automatically.
|
||||
authRequest.login(callback);
|
||||
```
|
||||
|
||||
Note, that since [v1.14.0](https://gitee.com/yadong.zhang/JustAuth/releases/v1.14.0) JustAuth has been integrated by default with [simple-http](https://github.com/xkcoding/simple-http) as the HTTP general interface (see the update [JustAuth 1.14.0 release! Perfect decoupling of HTTP tools](https://mp.weixin.qq.com/s?__biz=MzA3NDk3OTIwMg==&mid=2450633197&idx=1&sn=11e625b307db62b2f1c4e82f7744b2a2&chksm=88929300bfe51a16562b45592a264482ae2c74c6dbfa4a3aa9611ad4fea4a9be5b1f0545527d&token=1093833287&lang=zh_CN#rd)). Since most projects already integrate HTTP tools such as OkHttp3, apache HttpClient, and hutool-http), in order to reduce unnecessary dependencies,Starting from [v1.14.0](https://gitee.com/yadong.zhang/JustAuth/releases/v1.14.0), JustAuth will not integrate hutool-http by default. If the developer's project is new or there is no integrated HTTP implementation tool in the project, please add the corresponding HTTP implementation class by yourself. Alternative dependencies are as follows:
|
||||
> **latest-version** :
|
||||
> - CURRENT: 
|
||||
> - SNAPSHOT: 
|
||||
|
||||
|
||||
- Add http dependency(Only need one)
|
||||
|
||||
> If there is already in the project, please ignore it. In addition, you need to pay special attention. If the low version of the dependency has been introduced in the project, please exclude the low version of the dependency first, and then introduce the high version or the latest version of the dependency
|
||||
|
||||
- hutool-http
|
||||
|
||||
```xml
|
||||
@@ -149,55 +105,66 @@ Note, that since [v1.14.0](https://gitee.com/yadong.zhang/JustAuth/releases/v1.1
|
||||
```
|
||||
|
||||
|
||||
**Examples**:
|
||||
- [Springboot Example](https://github.com/justauth/JustAuth-demo)
|
||||
- [jFinal Example](https://github.com/xkcoding/jfinal-justauth-demo): by [xkcoding](https://github.com/xkcoding)
|
||||
- [ActFramework Example](https://github.com/xkcoding/act-justauth-demo): by [xkcoding](https://github.com/xkcoding)
|
||||
- [Nutzboot Example](https://github.com/EggsBlue/nutzboot-justauth-demo): by [蛋蛋](https://github.com/EggsBlue)
|
||||
- [Blade Example](https://github.com/justauth/blade-justauth-demo)
|
||||
### Using JustAuth API
|
||||
|
||||
**Springboot Starter**
|
||||
#### Simple
|
||||
|
||||
- [justauth-spring-boot-starter](https://github.com/xkcoding/justauth-spring-boot-starter): Spring Boot integrates best practices with JustAuth by [xkcoding](https://github.com/xkcoding)
|
||||
- [justauth-spring-boot-starter-demo](https://github.com/justauth/justauth-spring-boot-starter-demo): Justauth-spring-boot-starter demo project by [xkcoding](https://github.com/xkcoding)
|
||||
```java
|
||||
// Create authorization request
|
||||
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build());
|
||||
// Generate authorization page url
|
||||
authRequest.authorize("state");
|
||||
// Get token and userinfo
|
||||
authRequest.login(callback);
|
||||
```
|
||||
|
||||
#### API
|
||||
| :computer: platform | :coffee: API | :page_facing_up: Official document |
|
||||
|:------:|:-------:|:-------:|
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitee.png" width="20"> | [AuthGiteeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java) | <a href="https://gitee.com/api/v5/oauth_doc#list_1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/github.png" width="20"> | [AuthGithubRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java) | <a href="https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/weibo.png" width="20"> | [AuthWeiboRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java) | <a href="https://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/dingtalk.png" width="20"> | [AuthDingTalkRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java) | <a href="https://open-doc.dingtalk.com/microapp/serverapi2/kymkv6" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/baidu.png" width="20"> | [AuthBaiduRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java) | <a href="http://developer.baidu.com/wiki/index.php?title=docs/oauth" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/coding.png" width="25"> | [AuthCodingRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java) | <a href="https://open.coding.net/references/oauth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/tencentCloud.png" width="25"> | [AuthTencentCloudRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTencentCloudRequest.java) | <a href="https://dev.tencent.com/help/doc/faq/b4e5b7aee786/oauth" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/oschina.png" width="20"> | [AuthOschinaRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java) | <a href="https://www.oschina.net/openapi/docs/oauth2_authorize" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/alipay.png" width="20"> | [AuthAlipayRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java) | <a href="https://alipay.open.taobao.com/docs/doc.htm?spm=a219a.7629140.0.0.336d4b70GUKXOl&treeId=193&articleId=105809&docType=1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/qq.png" width="20"> | [AuthQqRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthQqRequest.java) | <a href="https://wiki.connect.qq.com/%E4%BD%BF%E7%94%A8authorization_code%E8%8E%B7%E5%8F%96access_token" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信开放平台"> | [AuthWeChatOpenRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatOpenRequest.java) | <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信公众平台"> | [AuthWeChatMpRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatMpRequest.java) | <a href="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="企业微信"> | [AuthWeChatEnterpriseRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseRequest.java) | <a href="https://open.work.weixin.qq.com/api/doc#90000/90135/90664" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/taobao.png" width="20"> | [AuthTaobaoRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java) | <a href="https://open.taobao.com/doc.htm?spm=a219a.7386797.0.0.4e00669acnkQy6&source=search&docId=105590&docType=1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/google.png" width="20"> | [AuthGoogleRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java) | <a href="https://developers.google.com/identity/protocols/OpenIDConnect" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/facebook.png" width="20"> | [AuthFacebookRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java) | <a href="https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/douyin.png" width="20"> | [AuthDouyinRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java) | <a href="https://www.douyin.com/platform/doc/m-2-1-1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/linkedin.png" width="20"> | [AuthLinkedinRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java) | <a href="https://docs.microsoft.com/zh-cn/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/microsoft.png" width="20"> | [AuthMicrosoftRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java) | <a href="https://docs.microsoft.com/zh-cn/graph/auth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/mi.png" width="20"> | [AuthMiRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMiRequest.java) | <a href="https://dev.mi.com/console/doc/detail?pId=711" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/toutiao.png" width="20"> | [AuthToutiaoRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java) | <a href="https://open.mp.toutiao.com/#/resource?_k=y7mfgk" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/teambition.png" width="20"> | [AuthTeambitionRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java) | <a href="https://docs.teambition.com/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/renren.png" width="20"> | [AuthRenrenRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java) | <a href="http://open.renren.com/wiki/OAuth2.0" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/pinterest.png" width="20"> | [AuthPinterestRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthPinterestRequest.java) | <a href="https://developers.pinterest.com/docs/api/overview/?" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/stackoverflow.png" width="20"> | [AuthStackOverflowRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthStackOverflowRequest.java) | <a href="https://api.stackexchange.com/docs/authentication" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/huawei.png" width="20"> | [AuthHuaweiRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthHuaweiRequest.java) | <a href="https://developer.huawei.com/consumer/cn/devservice/doc/30101" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/kujiale.png" width="20"> | [AuthKujialeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthKujialeRequest.java) | <a href="https://open.kujiale.com/open/apps/2/docs?doc_id=95" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitlab.png" width="20"> | [AuthGitlabRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGitlabRequest.java) | <a href="https://docs.gitlab.com/ee/api/oauth2.html" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/meituan.png" width="20"> | [AuthMeituanRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMeituanRequest.java) | <a href="http://open.waimai.meituan.com/openapi_docs/oauth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/eleme.png" width="20"> | [AuthElemeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthElemeRequest.java) | <a href="https://open.shop.ele.me/openapi/documents/khd001" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/twitter.png" width="20"> | [AuthTwitterRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTwitterRequest.java) | <a href="https://developer.twitter.com/en/docs/twitter-for-websites/log-in-with-twitter/guides/implementing-sign-in-with-twitter" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/csdn.png" width="20"> | [AuthCsdnRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java) | 无 |
|
||||
#### Builder 1. Use unchanging `AuthConfig`
|
||||
|
||||
```java
|
||||
// Create authorization request
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
.source("github")
|
||||
.authConfig(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build())
|
||||
.build();
|
||||
```
|
||||
|
||||
#### Builder 2. Use dynamic `AuthConfig`
|
||||
|
||||
```java
|
||||
// Create authorization request
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
.source("gitee")
|
||||
.authConfig((source) -> {
|
||||
// Use source to dynamically get AuthConfig
|
||||
// Here you can flexibly take the configuration from sql or take the configuration from the configuration file
|
||||
return AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build();
|
||||
})
|
||||
.build();
|
||||
```
|
||||
|
||||
#### Builder 3. Support custom platform
|
||||
|
||||
```java
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
// Key point: configure the custom implementation of AuthSource
|
||||
.extendSource(AuthExtendSource.values())
|
||||
// Enum name in AuthExtendSource
|
||||
.source("other")
|
||||
// ... Do other things
|
||||
.build();
|
||||
```
|
||||
|
||||
## Contributions
|
||||
|
||||
@@ -213,7 +180,11 @@ I look forward to your joining us.
|
||||
|
||||
## Contributors
|
||||
|
||||
[contributors](https://docs.justauth.whnb.wang/#/contributors)
|
||||
[contributors](https://justauth.wiki/contributors.html)
|
||||
|
||||
## Change Logs
|
||||
|
||||
[CHANGELOGS](https://justauth.wiki/update.html)
|
||||
|
||||
## Recommend
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<p align="center">
|
||||
<a href="https://docs.justauth.whnb.wang"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/Justauth.png" width="400"></a>
|
||||
<a href="https://justauth.wiki"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/Justauth.png" width="400"></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>Login, so easy.</strong>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://search.maven.org/search?q=JustAuth">
|
||||
<img src="https://img.shields.io/badge/Maven%20Central--1.15.1-blue" ></img>
|
||||
<img src="https://img.shields.io/github/v/release/justauth/JustAuth?style=flat-square" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://oss.sonatype.org/content/repositories/snapshots/me/zhyd/oauth/JustAuth/">
|
||||
<img src="https://img.shields.io/nexus/s/https/oss.sonatype.org/me.zhyd.oauth/JustAuth.svg?style=flat-square" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE">
|
||||
<img src="https://img.shields.io/apm/l/vim-mode.svg?color=yellow" ></img>
|
||||
@@ -14,94 +17,132 @@
|
||||
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://apidoc.gitee.com/yadong.zhang/JustAuth/" title="API文档">
|
||||
<img src="https://img.shields.io/badge/Api%20Docs--1.15.1-latest-orange" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://docs.justauth.whnb.wang" title="参考文档">
|
||||
<a target="_blank" href="https://justauth.wiki" title="参考文档">
|
||||
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/zhangyd-c/JustAuth">
|
||||
<img src="https://codecov.io/gh/zhangyd-c/JustAuth/branch/master/graph/badge.svg" />
|
||||
<a href="https://codecov.io/gh/justauth/JustAuth">
|
||||
<img src="https://codecov.io/gh/justauth/JustAuth/branch/master/graph/badge.svg?token=zYiAqd9aFz" />
|
||||
</a>
|
||||
<a href='https://gitee.com/yadong.zhang/JustAuth/stargazers'>
|
||||
<img src='https://gitee.com/yadong.zhang/JustAuth/badge/star.svg?theme=white' alt='star'></img>
|
||||
<img src='https://gitee.com/yadong.zhang/JustAuth/badge/star.svg?theme=gvp' alt='star'></img>
|
||||
</a>
|
||||
<a target="_blank" href='https://github.com/zhangyd-c/JustAuth'>
|
||||
<img src="https://img.shields.io/github/stars/zhangyd-c/JustAuth.svg?style=social" alt="github star"></img>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitee.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/github.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/weibo.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/dingtalk.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/baidu.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/coding.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/tencentCloud.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/oschina.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/alipay.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/qq.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信开放平台"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/taobao.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/google.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/facebook.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/douyin.png" width="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/linkedin.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/microsoft.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/mi.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/toutiao.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/teambition.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/renren.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/pinterest.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/stackoverflow.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/huawei.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信企业版"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/csdn.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/kujiale.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitlab.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/meituan.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/eleme.png" width="20"></td>
|
||||
<td align="center" width="200"><img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/twitter.png" width="20"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<center><a href="https://docs.justauth.whnb.wang/#/?id=%E5%B7%B2%E9%9B%86%E6%88%90%E7%9A%84%E5%B9%B3%E5%8F%B0" target="_blank">查看更多</a></center>
|
||||
</center>
|
||||
-------------------------------------------------------------------------------
|
||||
<p align="center">
|
||||
<img src='./docs/media/75a3c076.png' alt='star'></img>
|
||||
</p>
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
QQ 群:230017570
|
||||
微信群:justauth (备注`justauth`或者`ja`)
|
||||
帮助文档:[justauth.wiki](https://justauth.wiki)
|
||||
|
||||
#### [2020年4月10日(周五) 晚8点 直播间首秀《JustAuth 从开源到喜提「码云GVP」之路》](https://mp.weixin.qq.com/s?__biz=MzA3NDk3OTIwMg==&mid=2450633207&idx=1&sn=50320bb20d468cb06e0c7f96d7181bb0&chksm=8892931abfe51a0c9d051b468ba4046beb5b50d8393b9e308798e25954184b5a0ef2a133203a&token=977722026&lang=zh_CN#rd)
|
||||
## 什么是 JustAuth?
|
||||
|
||||
JustAuth,如你所见,它仅仅是一个**第三方授权登录**的**工具类库**,它可以让我们脱离繁琐的第三方登录SDK,让登录变得**So easy!**
|
||||
JustAuth,如你所见,它仅仅是一个**第三方授权登录**的**工具类库**,它可以让我们脱离繁琐的第三方登录 SDK,让登录变得**So easy!**
|
||||
|
||||
项目开源地址:[gitee](https://gitee.com/yadong.zhang/JustAuth) | [github](https://github.com/zhangyd-c/JustAuth)
|
||||
项目文档:[参考文档](https://docs.justauth.whnb.wang)
|
||||
JustAuth 集成了诸如:Github、Gitee、支付宝、新浪微博、微信、Google、Facebook、Twitter、StackOverflow等国内外数十家第三方平台。更多请参考<a href="https://justauth.wiki" target="_blank">已集成的平台</a>
|
||||
|
||||
## 特点
|
||||
|
||||
废话不多说,就俩字:
|
||||
## 有哪些特点?
|
||||
|
||||
1. **全**:已集成十多家第三方平台(国内外常用的基本都已包含),仍然还在持续扩展中([开发计划](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK))!
|
||||
2. **简**:API就是奔着最简单去设计的(见后面`快速开始`),尽量让您用起来没有障碍感!
|
||||
|
||||
## 有哪些功能?
|
||||
|
||||
- 集成国内外数十家第三方平台,实现快速接入。<a href="https://justauth.wiki/quickstart/how-to-use.html" target="_blank">参考文档</a>
|
||||
- 自定义 State 缓存,支持各种分布式缓存组件。<a href="https://justauth.wiki/features/customize-the-state-cache.html" target="_blank">参考文档</a>
|
||||
- 自定义 OAuth 平台,更容易适配自有的 OAuth 服务。<a href="https://justauth.wiki/features/customize-the-oauth.html" target="_blank">参考文档</a>
|
||||
- 自定义 Http 实现,选择权完全交给开发者,不会单独依赖某一具体实现。<a href="https://justauth.wiki/quickstart/how-to-use.html#%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F" target="_blank">参考文档</a>
|
||||
- 自定义 Scope,支持更完善的授权体系。<a href="https://justauth.wiki/features/customize-scopes.html" target="_blank">参考文档</a>
|
||||
- 更多...<a href="https://justauth.wiki" target="_blank">参考文档</a>
|
||||
|
||||
## 快速开始
|
||||
|
||||
- 引入依赖
|
||||
### 引入依赖
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>me.zhyd.oauth</groupId>
|
||||
<artifactId>JustAuth</artifactId>
|
||||
<version>1.15.1</version>
|
||||
<version>{latest-version}</version>
|
||||
</dependency>
|
||||
```
|
||||
- 调用api
|
||||
|
||||
> **latest-version** 可选:
|
||||
> - 稳定版:
|
||||
> - 快照版:
|
||||
> > 注意:快照版本是功能的尝鲜,并不保证稳定性。请勿在生产环境中使用。
|
||||
>
|
||||
> <details>
|
||||
> <summary>如何引入快照版本</summary>
|
||||
>
|
||||
> JustAuth 的快照版本托管在 ossrh 上,所以要指定下载地址。
|
||||
>
|
||||
> ```xml
|
||||
> <repositories>
|
||||
> <repository>
|
||||
> <id>ossrh-snapshot</id>
|
||||
> <url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
> <snapshots>
|
||||
> <enabled>true</enabled>
|
||||
> </snapshots>
|
||||
> </repository>
|
||||
> </repositories>
|
||||
> ```
|
||||
>
|
||||
> 如果你想第一时间获取 JustAuth 的最新快照,可以添加下列代码,每次构建时都检查是否有最新的快照(默认每天检查)。
|
||||
>
|
||||
> ```diff
|
||||
> <url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
> <snapshots>
|
||||
> + <updatePolicy>always</updatePolicy>
|
||||
> <enabled>true</enabled>
|
||||
> </snapshots>
|
||||
> ```
|
||||
>
|
||||
> </details>
|
||||
|
||||
如下**任选一种** HTTP 工具 依赖,_项目内如果已有,请忽略。另外需要特别注意,如果项目中已经引入了低版本的依赖,请先排除低版本依赖后,再引入高版本或者最新版本的依赖_
|
||||
|
||||
- hutool-http
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>5.7.7</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
- httpclient
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
- okhttp
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 调用api
|
||||
|
||||
#### 普通方式
|
||||
|
||||
```java
|
||||
// 创建授权request
|
||||
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
|
||||
@@ -116,153 +157,113 @@ authRequest.authorize("state");
|
||||
authRequest.login(callback);
|
||||
```
|
||||
|
||||
注意,JustAuth从[v1.14.0](https://gitee.com/yadong.zhang/JustAuth/releases/v1.14.0)开始默认集成了的[simple-http](https://github.com/xkcoding/simple-http)作为HTTP通用接口(更新说明见[JustAuth 1.14.0版本正式发布!完美解耦HTTP工具](https://mp.weixin.qq.com/s?__biz=MzA3NDk3OTIwMg==&mid=2450633197&idx=1&sn=11e625b307db62b2f1c4e82f7744b2a2&chksm=88929300bfe51a16562b45592a264482ae2c74c6dbfa4a3aa9611ad4fea4a9be5b1f0545527d&token=1093833287&lang=zh_CN#rd)),鉴于一般项目中都已经集成了HTTP工具,比如OkHttp3、apache HttpClient、hutool-http,因此为了减少不必要的依赖,从[v1.14.0](https://gitee.com/yadong.zhang/JustAuth/releases/v1.14.0)开始JustAuth将不会默认集成hutool-http,如果开发者的项目是全新的或者项目内没有集成HTTP实现工具,请自行添加对应的HTTP实现类,备选依赖如下:
|
||||
#### Builder 方式一
|
||||
|
||||
- hutool-http
|
||||
静态配置 `AuthConfig`
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-http</artifactId>
|
||||
<version>5.2.5</version>
|
||||
</dependency>
|
||||
```
|
||||
```java
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
.source("github")
|
||||
.authConfig(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build())
|
||||
.build();
|
||||
// 生成授权页面
|
||||
authRequest.authorize("state");
|
||||
// 授权登录后会返回code(auth_code(仅限支付宝))、state,1.8.0版本后,可以用AuthCallback类作为回调接口的参数
|
||||
// 注:JustAuth默认保存state的时效为3分钟,3分钟内未使用则会自动清除过期的state
|
||||
authRequest.login(callback);
|
||||
```
|
||||
|
||||
- httpclient
|
||||
#### Builder 方式二
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.12</version>
|
||||
</dependency>
|
||||
```
|
||||
动态获取并配置 `AuthConfig`
|
||||
|
||||
- okhttp
|
||||
```java
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
.source("gitee")
|
||||
.authConfig((source) -> {
|
||||
// 通过 source 动态获取 AuthConfig
|
||||
// 此处可以灵活的从 sql 中取配置也可以从配置文件中取配置
|
||||
return AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.build();
|
||||
})
|
||||
.build();
|
||||
Assert.assertTrue(authRequest instanceof AuthGiteeRequest);
|
||||
System.out.println(authRequest.authorize(AuthStateUtils.createState()));
|
||||
```
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.4.1</version>
|
||||
</dependency>
|
||||
```
|
||||
#### Builder 方式支持自定义的平台
|
||||
|
||||
```java
|
||||
AuthRequest authRequest = AuthRequestBuilder.builder()
|
||||
// 关键点:将自定义实现的 AuthSource 配置上
|
||||
.extendSource(AuthExtendSource.values())
|
||||
// source 对应 AuthExtendSource 中的枚举 name
|
||||
.source("other")
|
||||
// ... 其他内容不变,参考上面的示例
|
||||
.build();
|
||||
```
|
||||
|
||||
## 赞助和支持
|
||||
|
||||
感谢以下赞助商的支持:
|
||||
|
||||
[我要赞助](https://justauth.wiki/sponsor.html)
|
||||
|
||||
## JustAuth 的用户
|
||||
有很多公司、组织和个人把 JustAuth 用于学习、研究、生产环境和商业产品中,包括(但不限于):
|
||||
|
||||
[](https://www.mochiwang.com "给作者提供云写作的一个工具")
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
配套Demo**:
|
||||
|
||||
- [JustAuth-demo](https://github.com/justauth/JustAuth-demo)
|
||||
- [jFinal版](https://github.com/xkcoding/jfinal-justauth-demo): Jfinal集成JustAuth的demo by [xkcoding](https://github.com/xkcoding)
|
||||
- [ActFramework版](https://github.com/xkcoding/act-justauth-demo): ActFramework 集成 JustAuth 的 demo by [xkcoding](https://github.com/xkcoding)
|
||||
- [Nutzboot版](https://github.com/EggsBlue/nutzboot-justauth-demo): NutzBoot集成JustAuth的demo by [蛋蛋](https://github.com/EggsBlue)
|
||||
- [Blade版](https://github.com/justauth/blade-justauth-demo): Blade集成JustAuth的demo
|
||||
|
||||
## 插件
|
||||
- [justauth-spring-boot-starter](https://github.com/xkcoding/justauth-spring-boot-starter): Spring Boot 集成 JustAuth 的最佳实践 by [xkcoding](https://github.com/xkcoding)
|
||||
- [justauth-spring-boot-starter-demo](https://github.com/justauth/justauth-spring-boot-starter-demo): Spring Boot 使用 justauth-spring-boot-starter 快速集成 JustAuth by [xkcoding](https://github.com/xkcoding)
|
||||
|
||||
具体的例子可以参考:
|
||||
|
||||
- [实现Gitee授权登录](http://t.cn/ExDKxQs)
|
||||
- [实现Github授权登录](http://t.cn/EJ0Fxqo)
|
||||
- [Spring Boot 快速集成第三方登录功能](http://t.cn/AiWWx5kH) : QQ、Github、微信、谷歌、微软、小米、企业微信
|
||||
- [集成企业微信](https://mp.weixin.qq.com/s?__biz=MzA3NDk3OTIwMg==&mid=2450633170&idx=2&sn=456b70742a86948a193c691f3e47b72e&chksm=8892933fbfe51a29c1da386a2252d4bf91bfbd14e1ac0b99b783763a0d12e2e4b2d7c4369933&token=482455242&lang=zh_CN#rd)
|
||||
|
||||
#### API列表
|
||||
| :computer: 平台 | :coffee: API类 | :page_facing_up: SDK |
|
||||
|:------:|:-------:|:-------:|
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitee.png" width="20"> | [AuthGiteeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java) | <a href="https://gitee.com/api/v5/oauth_doc#list_1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/github.png" width="20"> | [AuthGithubRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java) | <a href="https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/weibo.png" width="20"> | [AuthWeiboRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java) | <a href="https://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/dingtalk.png" width="20"> | [AuthDingTalkRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java) | <a href="https://open-doc.dingtalk.com/microapp/serverapi2/kymkv6" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/baidu.png" width="20"> | [AuthBaiduRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java) | <a href="http://developer.baidu.com/wiki/index.php?title=docs/oauth" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/coding.png" width="25"> | [AuthCodingRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java) | <a href="https://open.coding.net/references/oauth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/tencentCloud.png" width="25"> | [AuthTencentCloudRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTencentCloudRequest.java) | <a href="https://dev.tencent.com/help/doc/faq/b4e5b7aee786/oauth" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/oschina.png" width="20"> | [AuthOschinaRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java) | <a href="https://www.oschina.net/openapi/docs/oauth2_authorize" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/alipay.png" width="20"> | [AuthAlipayRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java) | <a href="https://alipay.open.taobao.com/docs/doc.htm?spm=a219a.7629140.0.0.336d4b70GUKXOl&treeId=193&articleId=105809&docType=1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/qq.png" width="20"> | [AuthQqRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthQqRequest.java) | <a href="https://wiki.connect.qq.com/%E4%BD%BF%E7%94%A8authorization_code%E8%8E%B7%E5%8F%96access_token" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信开放平台"> | [AuthWeChatOpenRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatOpenRequest.java) | <a href="https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="微信公众平台"> | [AuthWeChatMpRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatMpRequest.java) | <a href="https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/wechat.png" width="20" title="企业微信"> | [AuthWeChatEnterpriseRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseRequest.java) | <a href="https://open.work.weixin.qq.com/api/doc#90000/90135/90664" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/taobao.png" width="20"> | [AuthTaobaoRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java) | <a href="https://open.taobao.com/doc.htm?spm=a219a.7386797.0.0.4e00669acnkQy6&source=search&docId=105590&docType=1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/google.png" width="20"> | [AuthGoogleRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java) | <a href="https://developers.google.com/identity/protocols/OpenIDConnect" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/facebook.png" width="20"> | [AuthFacebookRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java) | <a href="https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/douyin.png" width="20"> | [AuthDouyinRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java) | <a href="https://www.douyin.com/platform/doc/m-2-1-1" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/linkedin.png" width="20"> | [AuthLinkedinRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java) | <a href="https://docs.microsoft.com/zh-cn/linkedin/shared/authentication/authorization-code-flow?context=linkedin/context" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/microsoft.png" width="20"> | [AuthMicrosoftRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java) | <a href="https://docs.microsoft.com/zh-cn/graph/auth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/mi.png" width="20"> | [AuthMiRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMiRequest.java) | <a href="https://dev.mi.com/console/doc/detail?pId=711" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/toutiao.png" width="20"> | [AuthToutiaoRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java) | <a href="https://open.mp.toutiao.com/#/resource?_k=y7mfgk" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/teambition.png" width="20"> | [AuthTeambitionRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java) | <a href="https://docs.teambition.com/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/renren.png" width="20"> | [AuthRenrenRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java) | <a href="http://open.renren.com/wiki/OAuth2.0" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/pinterest.png" width="20"> | [AuthPinterestRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthPinterestRequest.java) | <a href="https://developers.pinterest.com/docs/api/overview/?" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/stackoverflow.png" width="20"> | [AuthStackOverflowRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthStackOverflowRequest.java) | <a href="https://api.stackexchange.com/docs/authentication" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/huawei.png" width="20"> | [AuthHuaweiRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthHuaweiRequest.java) | <a href="https://developer.huawei.com/consumer/cn/devservice/doc/30101" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/kujiale.png" width="20"> | [AuthKujialeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthKujialeRequest.java) | <a href="https://open.kujiale.com/open/apps/2/docs?doc_id=95" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/gitlab.png" width="20"> | [AuthGitlabRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthGitlabRequest.java) | <a href="https://docs.gitlab.com/ee/api/oauth2.html" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/meituan.png" width="20"> | [AuthMeituanRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthMeituanRequest.java) | <a href="http://open.waimai.meituan.com/openapi_docs/oauth/" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/eleme.png" width="20"> | [AuthElemeRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthElemeRequest.java) | <a href="https://open.shop.ele.me/openapi/documents/khd001" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/twitter.png" width="20"> | [AuthTwitterRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthTwitterRequest.java) | <a href="https://developer.twitter.com/en/docs/twitter-for-websites/log-in-with-twitter/guides/implementing-sign-in-with-twitter" target="_blank">参考文档</a> |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/JustAuth/csdn.png" width="20"> | [AuthCsdnRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java) | 无 |
|
||||
|
||||
_请知悉:经咨询CSDN官方客服得知,CSDN的授权开放平台已经下线。如果以前申请过的应用,可以继续使用,但是不再支持申请新的应用。so, 本项目中的CSDN登录只能针对少部分用户使用了_
|
||||
|
||||
## 后续开发计划
|
||||
|
||||
参考:[[开发计划] 待扩展的第三方平台](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK)
|
||||
|
||||
另外,期待您和我一起完善这个项目!
|
||||
|
||||
## 贡献代码
|
||||
|
||||
1. fork本项目到自己的repo
|
||||
2. 把fork过去的项目也就是你仓库中的项目clone到你的本地
|
||||
3. 修改代码
|
||||
4. commit后push到自己的库
|
||||
5. 发起PR(pull request) 请求,提交到`dev`分支
|
||||
6. 等待作者合并
|
||||
|
||||
## 贡献者名单
|
||||
|
||||
[contributors](https://docs.justauth.whnb.wang/#/contributors)
|
||||
|
||||
## 致谢
|
||||
|
||||
在项目立项初期,也对当前开源圈的一些相同类型的项目作过调研,同时本项目也参考过这些项目,再次感谢开源圈内的朋友。
|
||||
|
||||
- [YurunOAuthLogin](https://gitee.com/yurunsoft/YurunOAuthLogin): PHP 第三方登录授权 SDK
|
||||
- [阿里妈妈MUX倾力打造的矢量图标库-iconfont](https://www.iconfont.cn/search/index): 本文档中的图标大部分取自该平台
|
||||
- [mica](https://github.com/lets-mica/mica):Spring Cloud 微服务开发核心包,支持 `web `和 `webflux`。注:JustAuth项目中的[UuidUtils](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/utils/UuidUtils.java)就是直接使用的mica提供的高性能的uuid创建工具类源码[StringUtil.java](https://github.com/lets-mica/mica/blob/master/mica-core/src/main/java/net/dreamlu/mica/core/utils/StringUtil.java#L335)
|
||||
- 感谢 JetBrains 提供的免费开源 License:
|
||||
<img src="https://images.gitee.com/uploads/images/2020/0406/220236_f5275c90_5531506.png" alt="图片引用自lets-mica" style="float:left;">
|
||||
怎么没有我?[登记](https://gitee.com/yadong.zhang/JustAuth/issues/IZ2T7)
|
||||
|
||||
## 开源推荐
|
||||
|
||||
- `JAP` 开源的登录认证中间件: [https://gitee.com/fujieid/jap](https://gitee.com/fujieid/jap)
|
||||
- `spring-boot-demo` 深度学习并实战 spring boot 的项目: [https://github.com/xkcoding/spring-boot-demo](https://github.com/xkcoding/spring-boot-demo)
|
||||
- `mica` SpringBoot 微服务高效开发工具集: [https://github.com/lets-mica/mica](https://github.com/lets-mica/mica)
|
||||
- `pig` 宇宙最强微服务认证授权脚手架(架构师必备): [https://gitee.com/log4j/pig](https://gitee.com/log4j/pig)
|
||||
- `SpringBlade` 完整的线上解决方案(企业开发必备): https://gitee.com/smallc/SpringBlade
|
||||
- `MaxKey` 马克思的钥匙,寓意是最大钥匙,是用户单点登录认证系统(Sigle Sign On System),OAuth 2.0/OpenID Connect、SAML 2.0、JWT、CAS等标准化的开放协议,使用JustAuth集成OAuth第三方认证。: [https://shimingxy.github.io/MaxKey/](https://shimingxy.github.io/MaxKey/)
|
||||
## 关于OAuth
|
||||
- `sureness` 面向restful api的高性能认证鉴权框架:[sureness](https://github.com/usthe/sureness)
|
||||
|
||||
更多推荐,请参考:[JustAuth - 开源推荐](https://justauth.wiki)
|
||||
|
||||
- [The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749)
|
||||
- [OAuth 2.0](https://oauth.net/2/)
|
||||
## 鸣谢
|
||||
|
||||
## 关注&交流
|
||||
- 感谢 JetBrains 提供的免费开源 License:
|
||||
|
||||
| 公众号 | 微信(备注:加群) |
|
||||
| :------------: | :------------: |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/wx/wechat_account.jpg" width="200" /> | <img src="https://gitee.com/yadong.zhang/static/raw/master/wx/wx.png" width="170"/> |
|
||||
<p>
|
||||
<img src="https://images.gitee.com/uploads/images/2020/0406/220236_f5275c90_5531506.png" alt="图片引用自lets-mica" style="float:left;">
|
||||
</p>
|
||||
|
||||
**QQ群**
|
||||
## 其他
|
||||
|
||||
- JustAuth交流群 (230017570):专业交流该项目
|
||||
- [CONTRIBUTORS](https://justauth.wiki/contributors.html)
|
||||
- [CHANGELOGS](https://justauth.wiki/update.html)
|
||||
- [PLAN](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK)
|
||||
|
||||
- 开源总群 (190886500):各个开源项目的都有,也有博客建设等方面的朋友。
|
||||
## 贡献者列表
|
||||
|
||||
## 请喝咖啡
|
||||
[](https://whnb.wang)
|
||||
|
||||
| 支付宝 | 微信 |
|
||||
| :------------: | :------------: |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/qrcode/zfb_code.png" width="200"/> | <img src="https://gitee.com/yadong.zhang/static/raw/master/qrcode/wx_code.png" width="200" /> |
|
||||
## Stars 趋势
|
||||
|
||||
通过“[爱发电](https://afdian.net/@zhangyadong)”赞助,感谢您的支持
|
||||
### Gitee
|
||||
|
||||
[](https://whnb.wang/yadong.zhang/JustAuth?e=604800)
|
||||
|
||||
### Github
|
||||
|
||||
[](https://starchart.cc/justauth/JustAuth)
|
||||
|
||||
### ProductHunt
|
||||
|
||||
<a href="https://www.producthunt.com/posts/justauth?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-justauth" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=196886&theme=dark" alt="JustAuth - Login, so easy! | Product Hunt Embed" style="width: 250px; height: 54px;" width="250px" height="54px" /></a>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
git pull origin dev && git pull github dev && git pull cc dev
|
||||
@@ -0,0 +1 @@
|
||||
git push origin dev && git push github dev && git push cc dev
|
||||
@@ -0,0 +1 @@
|
||||
git push origin master && git push github master && git push cc master
|
||||
@@ -25,8 +25,6 @@ fi
|
||||
# 替换README.md等文件中的版本
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/README.md
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/README.en-US.md
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/docs/README.md
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/docs/_coverpage.md
|
||||
|
||||
# 替换pom.xml中的版本
|
||||
sed -i "s/${old_version}/${new_version}/g" $pwd/pom.xml
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.15.1
|
||||
1.16.4
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
## 1.项目编译报错
|
||||
**问题描述**
|
||||
|
||||
在使用JustAuth时,`AuthConfig.builder()`报错,提示没有`builder()`方法
|
||||
|
||||
**解决方案:**
|
||||
|
||||
安装完lombok插件即可
|
||||
|
||||
[eclipse安装lombok](https://www.zhyd.me/article/61)
|
||||
|
||||
**idea安装lombok:** file->settings->plugins->Browse Repositories->输入`lombok`,点击搜索->选中lombok点击install->安装完成后重启idea
|
||||
|
||||
**进阶版问题:**
|
||||
idea中安装完lombok并重启idea之后,启动项目仍然报错:
|
||||

|
||||
**解决办法**
|
||||

|
||||
默认是eclipse 选择javac就可以了
|
||||
|
||||
|
||||
## 2.~~升级到1.8.0后如何启用state?~~
|
||||
|
||||
~~在原api使用方法的基础上,为config追加一个state即可。~~
|
||||
```
|
||||
AuthRequest authRequest = new AuthGiteeRequest(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.state("state") // 就是这儿
|
||||
.build());
|
||||
```
|
||||
|
||||
## 3.~~升级到1.8.0后login方法报错?~~
|
||||
|
||||
~~这是因为1.8.0版本中新增了[AuthCallback](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/main/java/me/zhyd/oauth/model/AuthCallback.java)类,这个类封装了所有可能的回调参数。目前包含以下三个参数:~~
|
||||
- ~~`code`: 访问AuthorizeUrl后回调时带的参数code,用来换取token~~
|
||||
- ~~`auth_code`: 支付宝授权登陆时不会返回code而是返回`auth_code`参数~~
|
||||
- ~~`state`: 访问AuthorizeUrl后回调时带的参数state,用于和请求AuthorizeUrl前的state比较,防止CSRF攻击~~
|
||||
|
||||
~~1.8.0版本之后的api,可以直接用AuthCallback类作为回调方法的入参,比如:~~
|
||||
```
|
||||
@RequestMapping("/callback/{source}")
|
||||
public Object login(@PathVariable("source") String source, AuthCallback callback) {
|
||||
System.out.println("进入callback:" + source + " callback params:" + JSONObject.toJSONString(callback));
|
||||
AuthRequest authRequest = getAuthRequest(source);
|
||||
AuthResponse response = authRequest.login(callback);
|
||||
System.out.println(JSONObject.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
```
|
||||
~~_代码截取自_ :https://github.com/justauth/JustAuth-demo~~
|
||||
|
||||
## 4.~~升级到1.8.0后对于state参数有什么特殊要求吗?~~
|
||||
|
||||
~~理论上没有,stata只是用来保持会话状态,因为http协议的无状态性,从授权到回调,无法感知具体是哪个用户触发的。所以可以使用state作为校验。注:state参数每次完整的授权链中只可用一次!(也是为了防止不必要的危险)~~
|
||||
|
||||
~~作者建议state命名格式如下:~~
|
||||
- ~~授权登录:`{source}_{ip}_{random}`~~
|
||||
- ~~账号绑定:`{source}_{userId}_{ip}_{random}`~~
|
||||
|
||||
~~其中`source`表示授权平台,可以直接去JustAuth中的source,`ip`为当前用户的ip(部分情况可能不适用),`random`为随机字符串,`userId`为当前登录用户的id。~~
|
||||
|
||||
~~注:`authorize`和`login`(不是指回调传回的`state`,而是声明`request`时传入的`state`)中传的`state`务必保证一致~~
|
||||
|
||||
## 5.升级到1.9.3+版本后编译失败
|
||||
|
||||
主要明显的就是`IpUtils.getIp`和request的`.state`报错。
|
||||
|
||||
这是因为从`v1.9.3`版本开始,对项目进行了一些优化,具体优化内容参考:[v1.9.3](https://gitee.com/yadong.zhang/JustAuth/releases/v1.9.3)和[v1.9.4](https://gitee.com/yadong.zhang/JustAuth/releases/v1.9.4)。
|
||||
|
||||
新版本的使用方式,参考[JustAuth-demo](https://github.com/justauth/JustAuth-demo/blob/master/src/main/java/me/zhyd/justauth/RestAuthController.java)
|
||||
```
|
||||
@RequestMapping("/render/{source}")
|
||||
public void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException {
|
||||
AuthRequest authRequest = getAuthRequest(source);
|
||||
String authorizeUrl = authRequest.authorize(AuthStateUtils.createState());
|
||||
response.sendRedirect(authorizeUrl);
|
||||
}
|
||||
@RequestMapping("/callback/{source}")
|
||||
public Object login(@PathVariable("source") String source, AuthCallback callback) {
|
||||
AuthRequest authRequest = getAuthRequest(source);
|
||||
AuthResponse response = authRequest.login(callback);
|
||||
return response;
|
||||
}
|
||||
```
|
||||
|
||||
## 6.升级到最新版本后为什么支付宝登录不能用了?
|
||||
|
||||
在升级到新版后,使用支付宝登录会提示`ClassNotFoundExcption`异常,这是因为从`1.9.4`版本开始,JustAuth将不在强依赖`alipay-sdk-java`,如果你需要用到Alipay的授权登陆,那么你还需要添加以下依赖:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
<version>3.7.4.ALL</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## 7.“Scope参数错误或者Scope没有权限”是怎么回事?
|
||||
|
||||
微信开放平台授权登录提示“Scope参数错误或者Scope没有权限”
|
||||
|
||||

|
||||
|
||||
解决办法:请检查微信开放平台的应用是否有“微信登录”接口的权限。
|
||||
|
||||

|
||||
|
||||
“接口状态”必须为“已获得”!
|
||||
|
||||
## 8.微信登录时能在微信端提示登录成功吗?
|
||||
|
||||
不可以,这是**微信公众平台**的功能,截至到目前(JustAuth v1.12.0)为止,暂不支持**微信公众平台**的授权登录
|
||||
|
||||
## 9.微信登录时能不需要手机确认吗?扫码后就自动登录
|
||||
|
||||
不可以,微信开放平台不支持这种操作。可以把微信扫码登录理解成qq用账号密码登录,扫完码后不手动点确认,微信怎么知道用户是否同意了授权?
|
||||
当然,**微信公众平台**的授权流程可以越过这个限制,只要关注了公众号,后续扫码成功后就会自动登录,但是这是**微信公众平台**的功能,截至到目前(JustAuth v1.12.0)为止,暂不支持**微信公众平台**的授权登录
|
||||
|
||||
## 10.本地如何测那些*不支持本地地址回调*的授权登录?
|
||||
|
||||
推荐几种方案:
|
||||
1. 改`hosts`,然后将测试程序的端口改为`80`
|
||||
2. 使用`Nginx`/`Apache`做代理
|
||||
3. FRP内网穿透,参考地址:[使用内网穿透的方式集成第三方登录](https://xkcoding.com/2019/05/22/spring-boot-login-with-oauth.html)
|
||||
|
||||
## 11.如何获取QQ登录的`unionId`?
|
||||
|
||||
在AuthConfig中设备`unionId`为`true`
|
||||
|
||||
```java
|
||||
AuthRequest authRequest = new AuthQqRequest(AuthConfig.builder()
|
||||
.clientId("clientId")
|
||||
.clientSecret("clientSecret")
|
||||
.redirectUri("redirectUri")
|
||||
.unionId(true)
|
||||
.build());
|
||||
```
|
||||
> 注:使用unionId要求开发者必须已在qq开放平台申请了获取unionId的权限,否则可能会发生错误!切记!参考链接:[unionid介绍](http://wiki.connect.qq.com/unionid%E4%BB%8B%E7%BB%8D)
|
||||
|
||||
## 12. `AuthCallback`报错?
|
||||
|
||||
在使用JustAuth 1.13.0时,遇到如下所示错误:
|
||||

|
||||
|
||||
这是因为我没有做好代码审查和测试,所以才导致的问题。我检讨!深刻的检讨!
|
||||
|
||||
请遇到该问题的朋友及时升级到最新版本(`1.13.1`修复该问题)
|
||||
|
||||
ps: 我要去祭天了
|
||||
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
<p align="center">
|
||||
<a href="https://docs.justauth.whnb.wang"><img src="./_media/cover.png" width="400"></a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>Login, so easy!</strong>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>史上最全的整合第三方登录的开源库</strong>
|
||||
</p>
|
||||
<p align="center">
|
||||
<a target="_blank" href="https://search.maven.org/search?q=JustAuth">
|
||||
<img src="https://img.shields.io/badge/Maven%20Central--1.15.1-blue" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE">
|
||||
<img src="https://img.shields.io/apm/l/vim-mode.svg?color=yellow" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
|
||||
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://apidoc.gitee.com/yadong.zhang/JustAuth/" title="API文档">
|
||||
<img src="https://img.shields.io/badge/Api%20Docs--1.15.1-latest-orange" ></img>
|
||||
</a>
|
||||
<a target="_blank" href="https://docs.justauth.whnb.wang" title="参考文档">
|
||||
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/zhangyd-c/JustAuth">
|
||||
<img src="https://codecov.io/gh/zhangyd-c/JustAuth/branch/master/graph/badge.svg" />
|
||||
</a>
|
||||
<a href='https://gitee.com/yadong.zhang/JustAuth/stargazers'>
|
||||
<img src='https://gitee.com/yadong.zhang/JustAuth/badge/star.svg?theme=white' alt='star'></img>
|
||||
</a>
|
||||
<a target="_blank" href='https://github.com/zhangyd-c/JustAuth'>
|
||||
<img src="https://img.shields.io/github/stars/zhangyd-c/JustAuth.svg?style=social" alt="github star"></img>
|
||||
</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>开源地址:</strong> <a target="_blank" href='https://gitee.com/yadong.zhang/JustAuth'>Gitee</a> | <a target="_blank" href='https://github.com/zhangyd-c/JustAuth'>Github</a>
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>QQ群:</strong>230017570
|
||||
</p>
|
||||
<p align="center">
|
||||
<strong>文档更新日期:</strong> {docsify-updated}
|
||||
</p>
|
||||
|
||||
## 简介
|
||||
|
||||
JustAuth,如你所见,它仅仅是一个**第三方授权登录**的**工具类库**,它可以让我们脱离繁琐的第三方登录SDK,让登录变得**So easy!**
|
||||
|
||||
## 特点
|
||||
|
||||
废话不多说,就俩字:
|
||||
|
||||
1. **全**:已集成十多家第三方平台(国内外常用的基本都已包含),仍然还在持续扩展中([开发计划](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK))!
|
||||
2. **简**:API就是奔着最简单去设计的,尽量让您用起来没有障碍感!
|
||||
|
||||
## 项目关注度趋势
|
||||
|
||||
[](https://starchart.cc/justauth/JustAuth)
|
||||
|
||||
## 参与&贡献
|
||||
|
||||
JustAuth的发展离不开朋友们的支持,时至今日,JustAuth已渐趋完善,但仍有很大的改善空间。欢迎各位朋友为JustAuth贡献一份力量。
|
||||
|
||||
### 提供bug或建议
|
||||
|
||||
- [Gitee](https://gitee.com/yadong.zhang/JustAuth/issues)
|
||||
- [Github](https://github.com/justauth/JustAuth/issues)
|
||||
|
||||
如果你正在使用JustAuth,可以在这儿留下你的足迹,获得优先推送、曝光
|
||||
|
||||
- [Gitee](https://gitee.com/yadong.zhang/JustAuth/issues/IZ2T7)
|
||||
- [Github](https://github.com/justauth/JustAuth/issues/17)
|
||||
|
||||
### 贡献代码的步骤
|
||||
|
||||
1. fork本项目到自己的repo
|
||||
2. 把fork过去的项目也就是你仓库中的项目clone到你本地
|
||||
3. 修改代码(`dev`分支)
|
||||
4. commit后push到自己的仓库
|
||||
5. 发起PR(pull request) 请求,提交到`dev`分支
|
||||
6. 等待合并
|
||||
|
||||
### 注意事项
|
||||
|
||||
1. JustAuth只接受集成**OAuth2.0**的平台
|
||||
2. 建议安装“**阿里编码规约**”插件,然后进行开发
|
||||
3. 提交PR前请格式化好自己的代码
|
||||
4. 注释规范,自定义的方法一定要加上:方法说明、参数说明、返回值说明等
|
||||
|
||||
## 功能尝鲜
|
||||
|
||||
JustAuth一共有两个主要分支:
|
||||
- 线上版分支(master):稳定版,发布版就是这个分支的代码
|
||||
- 开发版分支(dev):不保证稳定,新功能都会优先推送到该分支,对于想尝鲜的朋友,可以直接下载代码,然后源码编译dev分支
|
||||
|
||||
## 开源推荐
|
||||
- `spring-boot-demo` 深度学习并实战 spring boot 的项目: [https://github.com/xkcoding/spring-boot-demo](https://github.com/xkcoding/spring-boot-demo)
|
||||
- `mica` SpringBoot 微服务高效开发工具集: [https://github.com/lets-mica/mica](https://github.com/lets-mica/mica)
|
||||
- `pig` 宇宙最强微服务认证授权脚手架(架构师必备): [https://gitee.com/log4j/pig](https://gitee.com/log4j/pig)
|
||||
- `SpringBlade` 完整的线上解决方案(企业开发必备): https://gitee.com/smallc/SpringBlade
|
||||
|
||||
## 捐赠
|
||||
|
||||
| 支付宝 | 微信 |
|
||||
| :------------: | :------------: |
|
||||
| <img src="https://gitee.com/yadong.zhang/static/raw/master/qrcode/zfb_code.png" width="200"/> | <img src="https://gitee.com/yadong.zhang/static/raw/master/qrcode/wx_code.png" width="200" /> |
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
# :alien: 404:alien:
|
||||
|
||||
**非常感谢您对JustAuth的关注**,您现在查询的内容,作者正在补充中!
|
||||
|
||||
您可能对以下文章感兴趣:
|
||||
|
||||
- [OAuth的授权流程是什么样的?](https://docs.justauth.whnb.wang/#/oauth)
|
||||
- [如何使用JustAuth?](https://docs.justauth.whnb.wang/#/how-to-use)
|
||||
- [提问与回答?](https://docs.justauth.whnb.wang/#/Q&A)
|
||||
- [如何集成Github?](https://docs.justauth.whnb.wang/#/oauth/github)
|
||||
- [如何集成Gitee?](https://docs.justauth.whnb.wang/#/oauth/gitee)
|
||||
- [如何集成支付宝?](https://docs.justauth.whnb.wang/#/oauth/alipay)
|
||||
- [如何自定义state?](https://docs.justauth.whnb.wang/#/customize-the-state-cache)
|
||||
- [如何自定义接入自己搭建的oauth平台?](https://docs.justauth.whnb.wang/#/customize-the-oauth)
|
||||
- [有哪些配套项目?](https://docs.justauth.whnb.wang/#/supporting)
|
||||
|
||||
### 想使用JustAuth集成第三方OAuth登录?
|
||||
|
||||
- [Gitee登录](oauth/gitee.md)
|
||||
- [Github登录](oauth/github.md)
|
||||
- [qq登录](oauth/qq.md)
|
||||
- [微信开放平台登录](oauth/wechat_open.md)
|
||||
- [微博登录](oauth/weibo.md)
|
||||
- [支付宝登录](oauth/alipay.md)
|
||||
- [酷家乐登录](oauth/kujiale.md)
|
||||
- 更多文章,正在补充中...
|
||||
|
||||
|
||||
### 如果还是没有您想要的内容,您可以:
|
||||
|
||||
1. (建议) 提Issue: 【[github](https://github.com/justauth/JustAuth/issues)】 | 【[gitee](https://gitee.com/yadong.zhang/JustAuth/issues)】
|
||||
2. 点击本页面右下角【OPEN CHAT】开始在线聊天
|
||||
3. 本页面底部直接留言
|
||||
4. 关注公众号(公众号会不定期推送相关内容),扫下方二维码关注公众号:
|
||||
|
||||
<img src="https://gitee.com/yadong.zhang/static/raw/master/wx/wechat_account.jpg" width="200" />
|
||||
|
||||
4. 加微信群(群内有各个优秀开源项目的作者和技术大神),微信扫下方二维码后加我好友(**注:一定要备注JustAUth,无备注的一律不加**):
|
||||
|
||||
<img src="https://gitee.com/yadong.zhang/static/raw/master/wx/wx.png" width="170"/>
|
||||
|
||||
5. 加QQ群:QQ搜索`230017570`(该QQ群为JustAuth官方技术讨论群,禁止群内打广告!)
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||

|
||||
# JustAuth <small>1.15.1</small>
|
||||
|
||||
<a href="https://mp.weixin.qq.com/s?__biz=MzA3NDk3OTIwMg==&mid=2450633207&idx=1&sn=50320bb20d468cb06e0c7f96d7181bb0&chksm=8892931abfe51a0c9d051b468ba4046beb5b50d8393b9e308798e25954184b5a0ef2a133203a&token=977722026&lang=zh_CN#rd" target="_blank"><h2><strong style="color:red">2020年4月10日(周五) 晚8点 直播间首秀《JustAuth 从开源到喜提「码云GVP」之路》</strong></h2></a>
|
||||
|
||||
<strong>史上最全的整合第三方登录的开源库</strong>
|
||||
|
||||
<strong>Login, so easy</strong>
|
||||
|
||||
<p>已集成国内外十多家平台</p>
|
||||
<p>极简的API设计</p>
|
||||
|
||||
|
||||
[Gitee](https://gitee.com/yadong.zhang/JustAuth)
|
||||
[Github](https://github.com/zhangyd-c/JustAuth)
|
||||
[Get Started](#简介)
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 882 KiB |
|
Before Width: | Height: | Size: 377 KiB |
|
Before Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 162 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 193 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,49 +0,0 @@
|
||||
- [入门和使用](README.md)
|
||||
- [贡献者名单](contributors.md)
|
||||
- 快速开始
|
||||
- [名词解释](explain.md)
|
||||
- [OAuth流程](oauth.md)
|
||||
- [如何使用](how-to-use.md)
|
||||
- [Q&A](Q&A.md)
|
||||
- 集成第三方
|
||||
- [√ Gitee登录](oauth/gitee.md)
|
||||
- [√ Github登录](oauth/github.md)
|
||||
- [√ qq登录](oauth/qq.md)
|
||||
- [√ 微信开放平台登录](oauth/wechat_open.md)
|
||||
- [√ 微博登录](oauth/weibo.md)
|
||||
- [√ 支付宝登录](oauth/alipay.md)
|
||||
- [√ 酷家乐登录](oauth/kujiale.md)
|
||||
- [微信企业版登录](oauth/wechatEnterprise.md)
|
||||
- [微信公众平台登录](oauth/wechat_mp.md)
|
||||
- [百度登录](oauth/baidu.md)
|
||||
- [Coding登录](oauth/coding.md)
|
||||
- [钉钉登录](oauth/dingtalk.md)
|
||||
- [开源中国登录](oauth/oschina.md)
|
||||
- [淘宝登录](oauth/taobao.md)
|
||||
- [腾讯云登录](oauth/tencentCloud.md)
|
||||
- [Google登录](oauth/google.md)
|
||||
- [Facebook登录](oauth/facebook.md)
|
||||
- [抖音登录](oauth/douyin.md)
|
||||
- [领英登录](oauth/linkedin.md)
|
||||
- [微软登录](oauth/microsoft.md)
|
||||
- [小米登录](oauth/mi.md)
|
||||
- [头条登录](oauth/toutiao.md)
|
||||
- [Teambition登录](oauth/teambition.md)
|
||||
- [人人登录](oauth/renren.md)
|
||||
- [Pinterest登录](oauth/pinterest.md)
|
||||
- [Stackoverflow登录](oauth/stackoverflow.md)
|
||||
- [华为登录](oauth/huawei.md)
|
||||
- [Gitlab登录](oauth/gitlab.md)
|
||||
- [美团登录](oauth/meituan.md)
|
||||
- [饿了么登录](oauth/eleme.md)
|
||||
- [CSDN登录](oauth/csdn.md)
|
||||
- [飞书登录](oauth/feishu.md)
|
||||
- 高级特性
|
||||
- [使用State](using-state.md)
|
||||
- [自定义state缓存](customize-the-state-cache.md)
|
||||
- [自定义第三方平台的OAuth](customize-the-oauth.md)
|
||||
- 扩展内容
|
||||
- [JustAuth与现有用户系统整合](extended/justauth_integrated_with_the_existing_account_system.md)
|
||||
- [Who is using](users.md)
|
||||
- [致谢](thx.md)
|
||||
- [更新记录](update.md)
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||
@@ -1,7 +0,0 @@
|
||||
(敬请期待...)
|
||||
|
||||
## 1. 申请应用
|
||||
|
||||
## 2. 集成JustAuth
|
||||
|
||||
## 3. 授权结果
|
||||