Showing preview only (666K chars total). Download the full file or copy to clipboard to get everything.
Repository: justauth/JustAuth
Branch: master
Commit: 694bbf1b010d
Files: 176
Total size: 613.3 KB
Directory structure:
gitextract_3291mr22/
├── .editorconfig
├── .gitee/
│ ├── ISSUE_TEMPLATE.zh-CN.md
│ └── PULL_REQUEST_TEMPLATE.zh-CN.md
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── request-help.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── deploy-snapshot.yml
│ └── test-pr.yml
├── .gitignore
├── .travis.yml
├── CHANGELOGS.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.en-US.md
├── README.md
├── bin/
│ ├── pull-dev.sh
│ ├── pull.sh
│ ├── push-dev.sh
│ ├── push.sh
│ ├── repVersion.sh
│ ├── updVersion.sh
│ └── version.txt
├── docs/
│ ├── .nojekyll
│ └── index.html
├── example.md
├── ja.sh
├── pom.xml
└── src/
├── main/
│ └── java/
│ └── me/
│ └── zhyd/
│ └── oauth/
│ ├── AuthRequestBuilder.java
│ ├── cache/
│ │ ├── AuthCache.java
│ │ ├── AuthCacheConfig.java
│ │ ├── AuthCacheScheduler.java
│ │ ├── AuthDefaultCache.java
│ │ ├── AuthDefaultStateCache.java
│ │ ├── AuthStateCache.java
│ │ └── package-info.java
│ ├── config/
│ │ ├── AuthConfig.java
│ │ ├── AuthDefaultSource.java
│ │ ├── AuthSource.java
│ │ ├── JustAuthLogConfig.java
│ │ └── package-info.java
│ ├── enums/
│ │ ├── AuthResponseStatus.java
│ │ ├── AuthToutiaoErrorCode.java
│ │ ├── AuthUserGender.java
│ │ ├── package-info.java
│ │ └── scope/
│ │ ├── AuthAmazonScope.java
│ │ ├── AuthAppleScope.java
│ │ ├── AuthBaiduScope.java
│ │ ├── AuthCodingScope.java
│ │ ├── AuthDingTalkScope.java
│ │ ├── AuthDouyinScope.java
│ │ ├── AuthFacebookScope.java
│ │ ├── AuthFigmaScope.java
│ │ ├── AuthGiteeScope.java
│ │ ├── AuthGithubScope.java
│ │ ├── AuthGitlabScope.java
│ │ ├── AuthGoogleScope.java
│ │ ├── AuthHuaweiScope.java
│ │ ├── AuthHuaweiV3Scope.java
│ │ ├── AuthJdScope.java
│ │ ├── AuthKujialeScope.java
│ │ ├── AuthLineScope.java
│ │ ├── AuthLinkedinScope.java
│ │ ├── AuthMiScope.java
│ │ ├── AuthMicrosoftScope.java
│ │ ├── AuthOktaScope.java
│ │ ├── AuthPinterestScope.java
│ │ ├── AuthProginnScope.java
│ │ ├── AuthQqScope.java
│ │ ├── AuthRenrenScope.java
│ │ ├── AuthScope.java
│ │ ├── AuthSlackScope.java
│ │ ├── AuthStackoverflowScope.java
│ │ ├── AuthWeChatEnterpriseWebScope.java
│ │ ├── AuthWechatMpScope.java
│ │ ├── AuthWeiboScope.java
│ │ └── package-info.java
│ ├── exception/
│ │ ├── AuthException.java
│ │ └── package-info.java
│ ├── log/
│ │ ├── Log.java
│ │ └── package-info.java
│ ├── model/
│ │ ├── AuthCallback.java
│ │ ├── AuthResponse.java
│ │ ├── AuthToken.java
│ │ ├── AuthUser.java
│ │ └── package-info.java
│ ├── package-info.java
│ ├── request/
│ │ ├── AbstractAuthDingtalkRequest.java
│ │ ├── AbstractAuthMicrosoftRequest.java
│ │ ├── AbstractAuthWeChatEnterpriseRequest.java
│ │ ├── AuthAfDianRequest.java
│ │ ├── AuthAlipayCertRequest.java
│ │ ├── AuthAlipayRequest.java
│ │ ├── AuthAliyunRequest.java
│ │ ├── AuthAmazonRequest.java
│ │ ├── AuthAppleRequest.java
│ │ ├── AuthBaiduRequest.java
│ │ ├── AuthCodingRequest.java
│ │ ├── AuthCsdnRequest.java
│ │ ├── AuthDefaultRequest.java
│ │ ├── AuthDingTalkAccountRequest.java
│ │ ├── AuthDingTalkRequest.java
│ │ ├── AuthDingTalkV2Request.java
│ │ ├── AuthDouyinRequest.java
│ │ ├── AuthElemeRequest.java
│ │ ├── AuthFacebookRequest.java
│ │ ├── AuthFeishuRequest.java
│ │ ├── AuthFigmaRequest.java
│ │ ├── AuthGiteeRequest.java
│ │ ├── AuthGithubRequest.java
│ │ ├── AuthGitlabRequest.java
│ │ ├── AuthGoogleRequest.java
│ │ ├── AuthHuaweiRequest.java
│ │ ├── AuthHuaweiV3Request.java
│ │ ├── AuthJdRequest.java
│ │ ├── AuthKujialeRequest.java
│ │ ├── AuthLineRequest.java
│ │ ├── AuthLinkedinRequest.java
│ │ ├── AuthMeituanRequest.java
│ │ ├── AuthMiRequest.java
│ │ ├── AuthMicrosoftCnRequest.java
│ │ ├── AuthMicrosoftRequest.java
│ │ ├── AuthOktaRequest.java
│ │ ├── AuthOschinaRequest.java
│ │ ├── AuthPinterestRequest.java
│ │ ├── AuthProginnRequest.java
│ │ ├── AuthQQMiniProgramRequest.java
│ │ ├── AuthQqRequest.java
│ │ ├── AuthRenrenRequest.java
│ │ ├── AuthRequest.java
│ │ ├── AuthSlackRequest.java
│ │ ├── AuthStackOverflowRequest.java
│ │ ├── AuthTaobaoRequest.java
│ │ ├── AuthTeambitionRequest.java
│ │ ├── AuthToutiaoRequest.java
│ │ ├── AuthTwitterRequest.java
│ │ ├── AuthWeChatEnterpriseQrcodeRequest.java
│ │ ├── AuthWeChatEnterpriseQrcodeV2Request.java
│ │ ├── AuthWeChatEnterpriseThirdQrcodeRequest.java
│ │ ├── AuthWeChatEnterpriseWebRequest.java
│ │ ├── AuthWeChatMpRequest.java
│ │ ├── AuthWeChatOpenRequest.java
│ │ ├── AuthWechatMiniProgramRequest.java
│ │ ├── AuthWeiboRequest.java
│ │ ├── AuthXmlyRequest.java
│ │ └── package-info.java
│ └── utils/
│ ├── AuthChecker.java
│ ├── AuthScopeUtils.java
│ ├── AuthStateUtils.java
│ ├── Base64Utils.java
│ ├── GlobalAuthUtils.java
│ ├── HttpUtils.java
│ ├── IpUtils.java
│ ├── PkceUtil.java
│ ├── RandomUtil.java
│ ├── Sha256.java
│ ├── StringUtils.java
│ ├── UrlBuilder.java
│ ├── UuidUtils.java
│ └── package-info.java
└── test/
└── java/
└── me/
└── zhyd/
└── oauth/
├── AuthRequestBuilderTest.java
├── cache/
│ └── AuthStateCacheTest.java
├── config/
│ └── AuthExtendSource.java
├── log/
│ └── LogTest.java
├── model/
│ └── AuthUserTest.java
├── request/
│ ├── AuthExtendRequest.java
│ ├── AuthExtendRequestTest.java
│ ├── AuthWeChatEnterpriseWebRequestTest.java
│ └── AuthWeChatMpRequestTest.java
└── utils/
├── GlobalAuthUtilsTest.java
├── JsonPathTest.java
├── ScopeTest.java
├── StringUtilsTest.java
├── UrlBuilderTest.java
└── UuidUtilsTest.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# JustAuth 开发组IDE 编辑器标准
root = true
# 空格替代Tab缩进在各种编辑工具下效果一致
[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
[*.java]
indent_size = 4
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
================================================
FILE: .gitee/ISSUE_TEMPLATE.zh-CN.md
================================================
为更快的帮您定位问题,推荐您用以下模板反馈问题:
### 1. 出现问题时,您做了哪些操作?
### 2. 在哪个步骤出现了问题?
### 3. 您希望得到什么结果?
### 4. 您实际得到什么结果?
### 5. 请附上您出现问题的整屏截图或者整个异常堆栈信息
================================================
FILE: .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md
================================================
- [ ] 是否为解决Issue?
### 您做了哪些更新?
- 新增
- 修改
- 修复
- 其他
### 是否做了充分测试?
- [ ] 是,已经做过测试,并且测试通过
- [ ] 否,还没做测试,需要作者自测
注:测试demo可以使用:
- [simple版](https://github.com/justauth/JustAuth-demo)
- [jFinal版](https://github.com/xkcoding/jfinal-justauth-demo)
- [ActFramework版](https://github.com/xkcoding/act-justauth-demo)
- [Nutzboot版](https://github.com/EggsBlue/nutzboot-justauth-demo)
- [Blade版](https://github.com/justauth/blade-justauth-demo)
================================================
FILE: .github/FUNDING.yml
================================================
# 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://www.justauth.cn/sponsor.html']
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
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://www.justauth.cn
- [ ] I have read the relevant Q&A: https://www.justauth.cn
## 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?
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
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
================================================
FILE: .github/ISSUE_TEMPLATE/request-help.md
================================================
---
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`):
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## 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?
================================================
FILE: .github/workflows/deploy-snapshot.yml
================================================
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 }}
================================================
FILE: .github/workflows/test-pr.yml
================================================
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
================================================
FILE: .gitignore
================================================
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rarp
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# exclude idea files
.idea
*.iml
bin/codecov.sh
bin/deploy.sh
bin/docsify-cli.sh
target
/pom.xml.versionsBackup
/gpg
/PLAN.md
================================================
FILE: .travis.yml
================================================
language: java
sudo: false # faster builds
install: true
jdk:
- openjdk8
notifications:
email: false
script:
- export TZ=Asia/Shanghai
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- mvn cobertura:cobertura -Dcobertura.report.format=xml -Dmaven.javadoc.skip.true
after_success:
- bash <(curl -s https://codecov.io/bash)
================================================
FILE: CHANGELOGS.md
================================================
## 1.16.7
### 2024/12/14
- 新增
- 添加`微信小程序`登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/wechat_mini_program/)。
- 添加`支付宝证书模式`登录能力(原支持的公钥登录模式依然可用),对接文档:[点击查看](https://justauth.cn/guide/oauth/alipay_cert)。
- 添加`appleid`社交登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/appleid/)。 [Github#192](https://github.com/justauth/JustAuth/pull/192)
- 添加`QQ小程序`社交登录能力。 [Github#223](https://github.com/justauth/JustAuth/pull/223)
- 添加`figma`社交登录能力。 [Gitee#41](https://gitee.com/yadong.zhang/JustAuth/pulls/41)
- 添加新版`企业微信扫码`登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/wechat_enterprise_qrcode_v2/)。 [Github Issue#165](https://github.com/justauth/JustAuth/issues/165)
- 添加新版`钉钉扫码`登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/dingtalk_v2/)。 [Gitee Issue#I73FZL](https://gitee.com/yadong.zhang/JustAuth/issues/I73FZL)
- 添加新版`华为`登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/huawei_v3/),原`AuthHuaweiRequest`会在后面版本被弃用,如有使用,请切换到`AuthHuaweiV3Request`
- 优化
- 修复文档错误。[Github #222](https://github.com/justauth/JustAuth/pull/222)
- 更新 Google 端点地址。[Github #198](https://github.com/justauth/JustAuth/pull/198)
- Amazon PKCE 中的 `code_verifier` 基于 `state` 缓存
- `AuthRequest`响应时携带泛型,避免二次解析。[Gitee#38](https://gitee.com/yadong.zhang/JustAuth/pulls/38)
- 优化业务调用方式:`getAccessToken`和`getUserInfo`两个方法从`AuthDefaultRequest`提升至`AuthRequest`中,部分场景下可以减少一次网络请求。[Github Issue#194](https://github.com/justauth/JustAuth/issues/194)
- ***注意:如果有基于 JustAuth 规范自定义实现的三方平台 Request([自定义第三方平台的OAuth](https://justauth.cn/features/customize-the-oauth/)),需要注意`getAccessToken`和`getUserInfo`接口的访问级别是否正确!!!***
- 其他
- 补充单侧,[Gitee#39](https://gitee.com/yadong.zhang/JustAuth/pulls/39)
## 1.16.6
### 2023/12/03
- 优化
- 微信公众平台支持返回快照标识(快照标识为 true 时,标识当前获取到的微信用户信息都是虚拟的)
- 企业微信网页登录--获取用户敏感信。 [Github #155](https://github.com/justauth/JustAuth/pull/155)
- 添加飞书单元测试。 [Github #159](https://github.com/justauth/JustAuth/pull/159)
- 升级fastjson版本到1.2.83,1.2.83版本之前存在代码执行漏洞风险 ,CVE-2022-25845。[Gitee PR #31](https://gitee.com/yadong.zhang/JustAuth/pulls/31)
- 新增
- 添加微软中国(世纪华联)第三方登录,新增微软方式登录的redirectUri校验。[Gitee PR #33](https://gitee.com/yadong.zhang/JustAuth/pulls/33)
- 新增爱发电平台 [Gitee #35](https://gitee.com/yadong.zhang/JustAuth/pulls/35)
- 微软平台适配 AzureAD(目前改名为 Microsoft Entra ID)登录认证
- Fixed
- 修复 twitter 平台在 Java11 环境下登录失败的问题。[#174](https://github.com/justauth/JustAuth/issues/174)
- 修复 Facebook 平台无法登录的问题(facebook 平台 API 进行了升级)
- 修复微信公众平台 scope 为 snsapi_base 登录报错的问题 [181](https://github.com/justauth/JustAuth/issues/181)
## 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://www.justauth.cn](https://www.justauth.cn)
- 新增
- 增加阿里云授权登录中刷新授权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://www.justauth.cn](https://www.justauth.cn/) 的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
- 修改
- 更新开发文档
- 合并Gitee [PR-10](https://gitee.com/yadong.zhang/JustAuth/pulls/10),集成京东登录
- 合并Gitee [PR-14](https://gitee.com/yadong.zhang/JustAuth/pulls/14),修改帮助文档,加入JA的使用者信息
- 合并Github [PR-69](https://github.com/justauth/JustAuth/pull/69),升级fastjson的最新版本
- 解决使用apache-httpclient时的403bug,升级simple-http,感谢QQ群的`不瘦十斤不改名字`反馈该问题
- 修复其他一些问题
【声明】:由于本人的失误,发布了一个错误的版本(1.15.0),目前1.15.0已发布,但是请不要使用,请直接升级到`1.15.1`。
给各位造成的不便,深表歉意。
## v1.14.0
### 2020/03/17
- 修改
- 合并[PR-59](https://github.com/justauth/JustAuth/pull/59),抽取HTTP,具体实现交给开发者,解耦 hutool-http,开发者可以视自己项目的依赖决定使用何种HTTP方式。详情请参考:https://github.com/xkcoding/simple-http
- 合并[PR-65](https://github.com/justauth/JustAuth/pull/65),修改错误文案
- 修复其他一些问题
## v1.14.0
### 2020/03/17
- 修改
- 合并[PR-59](https://github.com/justauth/JustAuth/pull/59),抽取HTTP,具体实现交给开发者,解耦 hutool-http,开发者可以视自己项目的依赖决定使用何种HTTP方式。详情请参考:https://github.com/xkcoding/simple-http
- 合并[PR-65](https://github.com/justauth/JustAuth/pull/65),修改错误文案
- 修复其他一些问题
## v1.13.2
### 2019/12/24
- 新增
- 增加微信、QQ、支付宝、微博授权登录的帮助文档
- 合并[PR#57](https://github.com/justauth/JustAuth/pull/57),增加微信公众号登录 by [@xkcoding](https://github.com/xkcoding)
- [帮助文档](https://www.justauth.cn)中增加自定义的404页面
- [帮助文档](https://www.justauth.cn)中增加Gittalk插件
- [帮助文档](https://www.justauth.cn)中增加Java代码高亮的插件
- 增加`AuthUserGender#getWechatRealGender`方法,兼容获取微信平台的用户性别
- 修改
- 修复抖音登录取值取错层级的问题([issue#I15SIG@Gitee](https://gitee.com/yadong.zhang/JustAuth/issues/I15SIG))
- 完善异常提示的逻辑,支持传入Source(平台),发生异常时显示对应的source(平台)
- `checkState`方法从`AuthDefaultRequest`中提出到`AuthChecker`中
- `AuthResponseStatus`枚举类中增加`ILLEGAL_STATUS`、`REQUIRED_REFRESH_TOKEN`两个枚举值
- `AuthSource`接口中增加`getName`方法,用来对外提供实际`source`的字符串值
- `AuthWeiboRequest`微博授权登录中实现`revoke`方法,支持手动回收授权
- [帮助文档](https://www.justauth.cn)中修复[腾讯云登录]链接错误的问题
- 升级
- 升级相关依赖: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))
## v1.13.1
### 2019/11/12
- 修复[Issue#52](https://github.com/justauth/JustAuth/issues/52),解决AuthCallback异常的问题。请正在使用 `v1.13.0`的朋友升级到`v1.13.1`
## v1.13.0
### 2019/11/01
- 集成“推特”
- 完善文档
## v1.12.0
### 2019/09/06
- 集成“美团”授权登录
- 集成“饿了么”授权登录
- 升级Fastjson依赖到1.2.60,预防[“Fastjson < 1.2.60 远程拒绝服务漏洞预警”](https://card.weibo.com/article/m/show/id/2309404413257925394542)
- 添加Nutzboot版的demo
- 提取公共的Source接口,支持自定义扩展第三方平台的授权登录,具体扩展例子可参考[AuthExtendRequest](https://gitee.com/yadong.zhang/JustAuth/blob/master/src/test/java/me/zhyd/oauth/request/AuthExtendRequest.java)
## v1.11.0
### 2019/09/03
- 集成“Gitlab”授权登录
### 2019/09/02
- 集成“酷家乐”授权登录
## v1.10.1
### 2019/08/17
- AuthUser添加构造函数,支持反序列化
### 2019/08/08
- 项目迁移到组织[justauth](https://github.com/justauth)
## v1.10.0
### 2019/08/06
- 合并[PR-34](https://github.com/zhangyd-c/JustAuth/pull/34),添加StringUtil单元测试,修复bug
- 合并[PR-35](https://github.com/zhangyd-c/JustAuth/pull/35),集成企业微信
### 2019/08/05
- 集成华为登录
- 修改`AuthChecker#checkCode`方法,对于不同平台使用不同参数接受code的情况统一做处理
### 2019/08/03
合并github上[xkcoding](https://github.com/xkcoding) 的[pr#32](https://github.com/zhangyd-c/JustAuth/pull/32),抽取 cache 接口,方便用户自行集成 cache
### 2019/08/02
- 增加`AuthCache`配置类`AuthCacheConfig.java`,可以自定义缓存有效期以及是否开启定时任务
- 去掉`slf4j`依赖,封装`Log.java`工具类
- 规范测试类
## v1.9.5
### 2019/07/31
`v1.9.4`版本发布失败,请升级到`1.9.5`版本!
由此给您带来的不便,敬请谅解!
## v1.9.4
### 2019/07/30
1. 升级`hutool-http`版本到`v4.6.1`
2. 去除`AuthCallback`中增加的默认的校验state的方法,挪到`AuthDefaultRequest`中做统一处理
3. `alipay-sdk-java`依赖改为`provided`,如果需要使用支付宝登录,需要使用方手动引入相关依赖,具体操作方式,见项目WIKI;
4. 规范注释
## v1.9.3
### 2019/07/30
1. 规范注释
2. 增加State缓存,`AuthCallback`中增加默认的校验state的方法
3. 增加默认的state生成方法,参考`AuthStateUtils.java`和`UuidUtils.java`
4. 升级`hutool-http`版本到`v4.6.0`
5. 修复其他一些问题
### 2019/07/27
1. `IpUtils.getIp`改名为`IpUtils.getLocalIp`
2. 规范注释
### 2019/07/25
1. `AuthConfig`类中去掉state参数
2. 删除`AuthState`类
3. 增加`authorize(String)`方法,并且使用`@Deprecated`标记`authorize()`方法
## v1.9.2
### 2019/07/22
1. 合并github上[xkcoding](https://github.com/xkcoding) 的[pr#26](https://github.com/zhangyd-c/JustAuth/pull/26),AuthConfig类添加lombok注解,方便 [justauth-spring-boot-starter](https://github.com/xkcoding/justauth-spring-boot-starter) 直接使用
## v1.9.1
### 2019/07/22
1. 增加`stackoverflow`参数校验
2. 解决`Pinterest`获取用户失败的问题
3. 添加注释
## v1.9.0
### 2019/07/19
1. 合并github上[@dyc12ii](https://github.com/dyc12ii) 的[pr#25](https://github.com/zhangyd-c/JustAuth/pull/25),升级fastjson版本至1.2.58,避免安全漏洞
2. `AuthUserGender`枚举类挪到`enums`包下
3. 删除`AuthBaiduErrorCode`和`AuthDingTalkErrorCode`枚举类
4. 优化百度授权流程,增加refresh token的方法
5. 优化`AuthConfig`、`AuthResponse`类,去掉不必要的lombonk注解,减少编译后的代码量
6. 使用lombok注解优化枚举类
7. `AuthQqRequest`增加refresh方法
8. 修复google登录无法获取用户信息的问题
9. 优化代码
### 2019/07/18
1. 合并github上[@pengisgood](https://github.com/pengisgood) 的[pr#19](https://github.com/zhangyd-c/JustAuth/pull/19),集成人人
2. 合并github上[@pengisgood](https://github.com/pengisgood) 的[pr#20](https://github.com/zhangyd-c/JustAuth/pull/20),集成Pinterest
3. 合并github上[@pengisgood](https://github.com/pengisgood) 的[pr#21](https://github.com/zhangyd-c/JustAuth/pull/21),集成StackOverflow
4. 合并github上[@xkcoding](https://github.com/xkcoding) 的[pr#23](https://github.com/zhangyd-c/JustAuth/pull/23),重构代码、新增编辑器规范,规范PR代码风格
### 2019/07/17
1. 优化代码
2. 集成Teambition登录
### 2019/07/16
1. 重构UrlBuilder类
2. 将CSDN相关的类置为`Deprecated`,后续可能会删除,也可能一直保留。毕竟CSDN的openAPI已经不对外开放了。
3. `BaseAuthRequest` 改名为 `AuthDefaultRequest`
4. `ResponseStatus` 改名为 `AuthResponseStatus` 并且移动到 `me.zhyd.oauth.model`
5. 合并github上[@xkcoding](https://github.com/xkcoding) 的[pr#18](https://github.com/zhangyd-c/JustAuth/pull/18),修复小米回调错误问题 同时 支持微信获取unionId
## v1.8.1
### 2019/07/15
1. 新增 `AuthState` 类,内置默认的state生成规则和校验规则
### 2019/07/12
1. 合并[Braavos96](https://github.com/Braavos96)提交的[PR#16](https://github.com/zhangyd-c/JustAuth/pull/16)
## v1.8.0
### 2019/06/28
1. 修复百度登录获取不到token失效时间的问题
2. 增加state参数校验,预防CSRF。**强烈建议启用state**!
### 2019/06/27
1. 修复百度登录获取不到token失效时间的问题
2. 增加state参数校验,预防CSRF。**强烈建议启用state**!
3. 修改login方法的参数为AuthCallback,封装回调返回的参数
4. 支持state参数
5. 增加code和state参数校验
由于state安全问题,1.8.0以前的版本都有隐藏的CSRF漏洞问题,所以强烈建议正在使用JustAuth的朋友升级到1.8.0版本!
## v1.7.1
### 2019/06/25
qq授权登录时,需要获取`openId`作为`uuid`,在`1.6.1-beta`和`1.7.0`版本中,引入了`unionId`这一属性。获取`unionid`需要单独向qq团队**发送邮件**申请权限,鉴于这一申请权限的步骤比较麻烦(需要填写的内容比较多),所以在`AuthConfig`中增加了一个`unionId`属性,当为**true**时才会获取unionid,当为false时只获取openId。如果你需要该功能, 则在自行申请了相关权限后,将该属性置为true即可。关于unionId的参考链接:[UnionID介绍](http://wiki.connect.qq.com/unionid%E4%BB%8B%E7%BB%8D)
## v1.7.0
### 2019/06/19
1. 合并[xkcoding](https://github.com/xkcoding)提交的[PR](https://github.com/zhangyd-c/JustAuth/pull/14),重构了部分代码,jar包由原来的`130+kb`优化到现在的`110+kb`
2. 合并[skqing](https://gitee.com/skqing)提交的[PR](https://gitee.com/yadong.zhang/JustAuth/pulls/3), 解决抖音登录失败问题
## v1.6.1-beta
### 2019/06/18
1. 解决Issue [#IY2HW](https://gitee.com/yadong.zhang/JustAuth/issues/IY2HW)
2. 解决Issue [#IY2OH](https://gitee.com/yadong.zhang/JustAuth/issues/IY2OH)
3. 解决Issue [#IY2FV](https://gitee.com/yadong.zhang/JustAuth/issues/IY2FV)
4. 修复部分注释、拼写错误
5. 解决Issue [#IY1QR](https://gitee.com/yadong.zhang/JustAuth/issues/IY1QR) 增加对Config属性的校验功能,主要校验redirect uri的合法性
6. 合并[skqing](https://gitee.com/skqing)提交的[PR](https://gitee.com/yadong.zhang/JustAuth/pulls/2),解决一些BUG
## v1.6.0-beta
### 2019/06/06
1. 增加今日头条的授权登陆
2. 发布1.6.0-beta版本,今日头条开发者暂时不能认证, 所以无法做测试,等测试通过后,正式发布release版本
## v1.5.0
### 2019/05/28
1. 增加小米账号和微软的授权登陆
2. 发布1.5.0版本
## v1.4.0
### 2019/05/26
1. 增加抖音和Linkedin的授权登陆
2. 修改部分图片命名
3. 优化部分代码
4. 修复`AuthSource`中腾讯云开发平台的拼写错误:`TENCEN_CLOUD`->`TENCENT_CLOUD`
5. 修复支付宝登陆时用户名为空的问题
## v1.3.3
### 2019/05/24
1. 修复一些问题
2. 升级api,在AuthUser中增加`uuid`属性,可以通过`uuid` + `source`唯一确定一个用户,此举解决了用户身份归属的问题。
3. 发布1.3.3版本的jar包到公开仓库(1.3.2忘记发布了,( ╯□╰ ))
4. 重要:经咨询官方客服得知,CSDN的授权开放平台已经下线,如果以前申请过的应用,可以继续使用,但是不再支持申请新的应用。so, 本项目中的CSDN登录只能针对少部分用户使用了
## v1.3.1
### 2019/05/23
1. 修复QQ登录的问题
2. 发布1.3.1版本的jar包到公开仓库
## v1.3.0
### 2019/05/21
1. 新增google授权登录
2. 新增facebook授权登录
3. 发布1.3.0版本的jar包到公开仓库
## v1.1.0
### 2019/05/18
1. 发布1.1.0版本的jar包到公开仓库(支持qq和微信登录)
2. 支持淘宝登录
3. 修改`AuthUser.java`类中的`accessToken`属性,由原本的~~accessToken (String)~~改为`token (AuthToken)`
4. 修复一些bug
5. 发布1.2.0版本的jar包到公开仓库(支持淘宝登录)
### 2019/05/17
1. 增加qq和微信的授权登录
2. 修改getAccessToken方法的返回值
## v1.0.1
### 2019/03/27
集成 支付宝授权登录
## v1.0.0
### 2019/03/25
史上最全的整合第三方登录的工具,目前已支持Github、Gitee、微博、钉钉和百度、Coding、腾讯云开发者平台和OSChina登录。 Login, so easy!
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# 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
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2019 https://gitee.com/yadong.zhang/JustAuth
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.en-US.md
================================================
<p align="center">
<a href="https://www.justauth.cn"><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/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>
</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://www.justauth.cn" title="参考文档">
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
</a>
<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=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>
-------------------------------------------------------------------------------
<p align="center">
<img src='./docs/media/75a3c076.png' alt='star'></img>
</p>
-------------------------------------------------------------------------------
`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://www.justauth.cn)
## Features
1. **Multiple platform**: Has integrated more than a dozen third-party platforms.([plan](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK))
2. **Minimalist**: The minimalist design is very simple to use.
## Quick start
### Add maven dependency
- Add JustAuth dependency
These artifacts are available from Maven Central:
```xml
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>{latest-version}</version>
</dependency>
```
> **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
<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>
```
- okhttp
```xml
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.4.1</version>
</dependency>
```
### Using JustAuth API
#### Simple
```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);
```
#### 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
1. Fork this project to your repository
2. Clone the project after fork.
3. Modify the code (either to fix issue, or to add new features)
4. Commit and push code to a remote repository
5. Create a new PR (pull request), and select `dev` branch
6. Waiting for author to merge
I look forward to your joining us.
## Contributors
[contributors](https://www.justauth.cn/contributors.html)
## Change Logs
[CHANGELOGS](https://www.justauth.cn/update.html)
## Recommend
- `spring-boot-demo` In-depth study and actual combat of spring boot projects: [https://github.com/xkcoding/spring-boot-demo](https://github.com/xkcoding/spring-boot-demo)
- `mica` Efficient Development of scaffolding by Spring Cloud: [https://github.com/lets-mica/mica](https://github.com/lets-mica/mica)
- `pig` Cosmic strongest Micro Services Certified authorized scaffolding (essential for Architects): [https://gitee.com/log4j/pig](https://gitee.com/log4j/pig)
- `SpringBlade` Complete online solution (necessary for enterprise development): https://gitee.com/smallc/SpringBlade
## References
- [The OAuth 2.0 Authorization Framework](https://tools.ietf.org/html/rfc6749)
- [OAuth 2.0](https://oauth.net/2/)
================================================
FILE: README.md
================================================
<p align="center">
<a href="https://www.justauth.cn"><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/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>
</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://www.justauth.cn" title="参考文档">
<img src="https://img.shields.io/badge/Docs-latest-blueviolet.svg" ></img>
</a>
<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=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>
-------------------------------------------------------------------------------
<p align="center">
<img src='./docs/media/75a3c076.png' alt='star'></img>
</p>
-------------------------------------------------------------------------------
QQ 群:230017570
微信群:justauth (备注`justauth`或者`ja`)
帮助文档:[www.justauth.cn](https://www.justauth.cn)
## 什么是 JustAuth?
JustAuth,如你所见,它仅仅是一个**第三方授权登录**的**工具类库**,它可以让我们脱离繁琐的第三方登录 SDK,让登录变得**So easy!**
JustAuth 集成了诸如:Github、Gitee、支付宝、新浪微博、微信、Google、Facebook、Twitter、StackOverflow等国内外数十家第三方平台。更多请参考<a href="https://www.justauth.cn" target="_blank">已集成的平台</a>
## 有哪些特点?
1. **全**:已集成十多家第三方平台(国内外常用的基本都已包含),仍然还在持续扩展中([开发计划](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK))!
2. **简**:API就是奔着最简单去设计的(见后面`快速开始`),尽量让您用起来没有障碍感!
## 有哪些功能?
- 集成国内外数十家第三方平台,实现快速接入。<a href="https://www.justauth.cn/guide/" target="_blank">参考文档</a>
- 自定义 State 缓存,支持各种分布式缓存组件。<a href="https://www.justauth.cn/features/using-state/" target="_blank">参考文档</a>
- 自定义 OAuth 平台,更容易适配自有的 OAuth 服务。<a href="https://www.justauth.cn/features/customize-the-oauth/" target="_blank">参考文档</a>
- 自定义 Http 实现,选择权完全交给开发者,不会单独依赖某一具体实现。<a href="https://www.justauth.cn/guide/quickstart/how-to-use/#%E4%BD%BF%E7%94%A8%E6%AD%A5%E9%AA%A4" target="_blank">参考文档</a>
- 自定义 Scope,支持更完善的授权体系。<a href="https://www.justauth.cn/features/customize-scopes/#%E5%85%B3%E4%BA%8E-scope" target="_blank">参考文档</a>
- 更多...<a href="https://www.justauth.cn" target="_blank">参考文档</a>
## 快速开始
### 引入依赖
```xml
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>{latest-version}</version>
</dependency>
```
> **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()
.clientId("clientId")
.clientSecret("clientSecret")
.redirectUri("redirectUri")
.build());
// 生成授权页面
authRequest.authorize("state");
// 授权登录后会返回code(auth_code(仅限支付宝))、state,1.8.0版本后,可以用AuthCallback类作为回调接口的参数
// 注:JustAuth默认保存state的时效为3分钟,3分钟内未使用则会自动清除过期的state
authRequest.login(callback);
```
#### Builder 方式一
静态配置 `AuthConfig`
```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);
```
#### Builder 方式二
动态获取并配置 `AuthConfig`
```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()));
```
#### Builder 方式支持自定义的平台
```java
AuthRequest authRequest = AuthRequestBuilder.builder()
// 关键点:将自定义实现的 AuthSource 配置上
.extendSource(AuthExtendSource.values())
// source 对应 AuthExtendSource 中的枚举 name
.source("other")
// ... 其他内容不变,参考上面的示例
.build();
```
## 赞助和支持
感谢以下赞助商的支持:
[我要赞助](https://www.justauth.cn/sponsor.html)
## JustAuth 的用户
有很多公司、组织和个人把 JustAuth 用于学习、研究、生产环境和商业产品中,包括(但不限于):
[](https://www.mochiwang.com "给作者提供云写作的一个工具")

怎么没有我?[登记](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)
- `sureness` 面向restful api的高性能认证鉴权框架:[sureness](https://github.com/usthe/sureness)
更多推荐,请参考:[JustAuth - 开源推荐](https://www.justauth.cn)
## 鸣谢
- 感谢 JetBrains 提供的免费开源 License:
<p>
<img src="https://images.gitee.com/uploads/images/2020/0406/220236_f5275c90_5531506.png" alt="图片引用自lets-mica" style="float:left;">
</p>
## 其他
- [CONTRIBUTORS](https://www.justauth.cn/contributors.html)
- [CHANGELOGS](https://www.justauth.cn/update.html)
- [PLAN](https://gitee.com/yadong.zhang/JustAuth/issues/IUGRK)
## 贡献者列表
[](https://whnb.wang)
## Stars 趋势
### 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>
================================================
FILE: bin/pull-dev.sh
================================================
git pull origin dev && git pull github dev
================================================
FILE: bin/pull.sh
================================================
git pull origin master && git pull github master
================================================
FILE: bin/push-dev.sh
================================================
git push origin dev && git push github dev
================================================
FILE: bin/push.sh
================================================
git push origin master && git push github master
================================================
FILE: bin/repVersion.sh
================================================
#!/bin/bash
#-----------------------------------------------------------
# 参考自 hutool 工具
# 此脚本用于每次升级justauth时替换相应位置的版本号
#-----------------------------------------------------------
pwd=$(pwd)
echo "当前路径:$pwd"
if [ -n "$1" ];then
new_version="$1"
old_version=`cat $pwd/bin/version.txt`
echo "$old_version 替换为新版本 $new_version"
else
# 参数错误,退出
echo "ERROR: 请指定新版本!"
exit
fi
if [ ! -n "$old_version" ]; then
echo "ERROR: 旧版本不存在,请确认bin/version.txt中信息正确"
exit
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
# 替换pom.xml中的版本
sed -i "s/${old_version}/${new_version}/g" $pwd/pom.xml
# 保留新版本号
echo "$new_version" > $pwd/bin/version.txt
================================================
FILE: bin/updVersion.sh
================================================
#!/bin/bash
#------------------------------------------------
# 参考自 hutool 工具
# 升级justauth版本,包括:
# 1. 升级pom.xml中的版本号
# 2. 替换README.md中的版本号
#------------------------------------------------
if [ ! -n "$1" ]; then
echo "ERROR: 新版本不存在,请指定参数1"
exit
fi
# 替换所有模块pom.xml中的版本
mvn versions:set -DnewVersion=$1
# 替换其它地方的版本
source $(pwd)/bin/repVersion.sh "$1"
================================================
FILE: bin/version.txt
================================================
1.16.7
================================================
FILE: docs/.nojekyll
================================================
================================================
FILE: docs/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="google-site-verification" content="DJSx-fAGWci-EWueWy2_RfafHJX1iv5XhfftGSg-SR0" />
<meta charset="UTF-8">
<title>JustAuth - 史上最全的整合第三方登录的开源库</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="description" content="JustAuth,史上最全的整合第三方登录的开源库" />
<meta name="keywords" content="JustAuth,第三方授权登录,OAuth" />
<meta itemprop="name" content="JustAuth,史上最全的整合第三方登录的开源库" />
<meta itemprop="description" content="JustAuth,如你所见,它仅仅是一个第三方授权登录的工具类库,它可以让我们脱离繁琐的第三方登录SDK,让登录变得So easy!" />
</head>
<body>
<script>
window.location.href = "https://www.justauth.cn";
</script>
</body>
</html>
================================================
FILE: example.md
================================================
## 各平台授权页面示例
_注:非全部平台,部分平台可能不存在图例_
#### 授权gitee

#### 授权github

#### 授权weibo

#### 授权钉钉

#### 授权百度

#### 授权coding

#### 授权腾讯云开发者平台

#### 授权oschina

#### 授权支付宝

#### 授权qq
暂无
#### 授权微信

#### 授权淘宝

#### 授权Google

#### 授权Facebook

#### 授权抖音
暂无
#### 授权领英

#### 授权微软

#### 授权小米
暂无
#### 授权今日头条
暂无
#### 授权Teambition

#### 授权Pinterest

#### 授权Renren

#### 授权Stack Overflow

#### 授权afdian

#### 授权Twitter

#### 授权csdn
暂无
_请知悉:经咨询CSDN官方客服得知,CSDN的授权开放平台已经下线。如果以前申请过的应用,可以继续使用,但是不再支持申请新的应用。so, 本项目中的CSDN登录只能针对少部分用户使用了_
================================================
FILE: ja.sh
================================================
#!/bin/bash
# 参考自 hutool 工具
help(){
echo "--------------------------------------------------------------------------"
echo ""
echo "usage: ./ja.sh [updv]"
echo ""
echo "-updv [version num] Update all justauth related versions."
echo ""
echo "--------------------------------------------------------------------------"
}
case "$1" in
'updv')
bin/updVersion.sh $2
;;
'ppd')
bin/pull-dev.sh
;;
'pp')
bin/pull.sh
;;
'pd')
bin/push-dev.sh
;;
'p')
bin/push.sh
;;
'd')
bin/deploy.sh
;;
*)
help
esac
================================================
FILE: pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.16.7</version>
<name>JustAuth</name>
<url>https://gitee.com/yadong.zhang/JustAuth</url>
<description>
小而全而美的第三方登录开源组件。目前已支持Github、Gitee、微博、钉钉、百度、Coding、腾讯云开发者平台、OSChina、支付宝、QQ、微信、淘宝、Google、Facebook、抖音、领英、小米、微软、今日头条、Teambition、StackOverflow、Pinterest、人人、华为、企业微信、酷家乐、Gitlab、美团、饿了么、推特、飞书、京东、阿里云、喜马拉雅、Amazon、Slack和Line等第三方平台的授权登录。 Login, so easy!
</description>
<licenses>
<license>
<name>MIT</name>
<url>https://gitee.com/yadong.zhang/JustAuth/blob/master/LICENSE</url>
</license>
</licenses>
<scm>
<connection>scm:git:https://gitee.com/yadong.zhang/JustAuth.git</connection>
<developerConnection>scm:git:https://gitee.com/yadong.zhang/JustAuth.git</developerConnection>
<url>https://gitee.com/yadong.zhang/JustAuth</url>
</scm>
<developers>
<developer>
<name>Yadong.Zhang</name>
<email>yadong.zhang0415@gmail.com</email>
<url>https://www.zhyd.me</url>
</developer>
<developer>
<name>Yangkai.Shen</name>
<email>shenyangkai1994@gmail.com</email>
<url>https://xkcoding.com</url>
</developer>
<developer>
<name>Hongwei.Peng</name>
<email>pengisgood@gmail.com</email>
<url>https://github.com/pengisgood</url>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven-source.version>2.2.1</maven-source.version>
<maven-compiler.version>3.8.1</maven-compiler.version>
<maven-javadoc.version>2.9.1</maven-javadoc.version>
<cobertura-version>2.7</cobertura-version>
<maven-surefire-version>2.20</maven-surefire-version>
<maven-gpg-version>1.6</maven-gpg-version>
<maven.test.skip>false</maven.test.skip>
<simple-http.version>1.0.5</simple-http.version>
<lombok-version>1.18.30</lombok-version>
<junit-version>4.13.2</junit-version>
<fastjson-version>1.2.83</fastjson-version>
<alipay-sdk-version>4.39.165.ALL</alipay-sdk-version>
<jacoco-version>0.8.2</jacoco-version>
<jwt.version>0.12.3</jwt.version>
<bcpkix-jdk18on.version>1.78</bcpkix-jdk18on.version>
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok-version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.xkcoding.http</groupId>
<artifactId>simple-http</artifactId>
<version>${simple-http.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson-version}</version>
</dependency>
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>${alipay-sdk-version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>fastjson</artifactId>
<groupId>com.alibaba</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>${jwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>${jwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>${jwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>${bcpkix-jdk18on.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler.version}</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source.version}</version>
<inherited>true</inherited>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<additionalparam>${javadoc.opts}</additionalparam>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-version}</version>
<configuration>
<!-- 包含其他测试类 -->
<includes>
<include>**/*Test.java</include>
</includes>
<!-- 排除掉AuthRequestTest测试类,该类只做api演示用 -->
<excludes>
<exclude>**/AuthRequestTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>snapshot</id>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source.version}</version>
<inherited>true</inherited>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>${cobertura-version}</version>
<configuration>
<formats>
<format>html</format>
<format>xml</format>
</formats>
<check/>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
<!--私服-->
<profile>
<id>nexus</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>xkcoding-nexus</id>
<url>https://nexus.xkcoding.com/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>xkcoding-nexus</id>
<url>https://nexus.xkcoding.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>
</profile>
<!-- 禁用 Javadoc 注释检查 -->
<profile>
<id>disable-javadoc-doclint</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties>
</profile>
</profiles>
</project>
================================================
FILE: src/main/java/me/zhyd/oauth/AuthRequestBuilder.java
================================================
package me.zhyd.oauth;
import me.zhyd.oauth.cache.AuthStateCache;
import me.zhyd.oauth.config.AuthConfig;
import me.zhyd.oauth.config.AuthDefaultSource;
import me.zhyd.oauth.config.AuthSource;
import me.zhyd.oauth.enums.AuthResponseStatus;
import me.zhyd.oauth.exception.AuthException;
import me.zhyd.oauth.request.AuthDefaultRequest;
import me.zhyd.oauth.request.AuthRequest;
import me.zhyd.oauth.utils.StringUtils;
import java.util.Arrays;
import java.util.function.Function;
/**
* 快捷的构建 AuthRequest
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @author ngcly
* @version 1.0.0
* @since 1.16.3
*/
public class AuthRequestBuilder {
private String source;
private AuthConfig authConfig;
private AuthStateCache authStateCache;
private AuthSource[] extendSource;
private AuthRequestBuilder() {
}
public static AuthRequestBuilder builder() {
return new AuthRequestBuilder();
}
public AuthRequestBuilder source(String source) {
this.source = source;
return this;
}
public AuthRequestBuilder authConfig(AuthConfig authConfig) {
this.authConfig = authConfig;
return this;
}
public AuthRequestBuilder authConfig(Function<String, AuthConfig> authConfig) {
this.authConfig = authConfig.apply(this.source);
return this;
}
public AuthRequestBuilder authStateCache(AuthStateCache authStateCache) {
this.authStateCache = authStateCache;
return this;
}
public AuthRequestBuilder extendSource(AuthSource... extendSource) {
this.extendSource = extendSource;
return this;
}
public AuthRequest build() {
if (StringUtils.isEmpty(this.source) || null == this.authConfig) {
throw new AuthException(AuthResponseStatus.NOT_IMPLEMENTED);
}
// 合并 JustAuth 默认的 AuthDefaultSource 和 开发者自定义的 AuthSource
AuthSource[] sources = this.concat(AuthDefaultSource.values(), extendSource);
// 筛选符合条件的 AuthSource
AuthSource source = Arrays.stream(sources).distinct()
.filter(authSource -> authSource.getName().equalsIgnoreCase(this.source))
.findAny()
.orElseThrow(() -> new AuthException(AuthResponseStatus.NOT_IMPLEMENTED));
Class<? extends AuthDefaultRequest> targetClass = source.getTargetClass();
if (null == targetClass) {
throw new AuthException(AuthResponseStatus.NOT_IMPLEMENTED);
}
try {
if (this.authStateCache == null) {
return targetClass.getDeclaredConstructor(AuthConfig.class).newInstance(this.authConfig);
} else {
return targetClass.getDeclaredConstructor(AuthConfig.class, AuthStateCache.class).newInstance(this.authConfig, this.authStateCache);
}
} catch (Exception e) {
e.printStackTrace();
throw new AuthException(AuthResponseStatus.NOT_IMPLEMENTED);
}
}
private AuthSource[] concat(AuthSource[] first, AuthSource[] second) {
if (null == second || second.length == 0) {
return first;
}
AuthSource[] result = new AuthSource[first.length + second.length];
System.arraycopy(first, 0, result, 0, first.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthCache.java
================================================
package me.zhyd.oauth.cache;
/**
* JustAuth缓存,用来缓存State
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.9.3
*/
public interface AuthCache {
/**
* 设置缓存
*
* @param key 缓存KEY
* @param value 缓存内容
*/
void set(String key, String value);
/**
* 设置缓存,指定过期时间
*
* @param key 缓存KEY
* @param value 缓存内容
* @param timeout 指定缓存过期时间(毫秒)
*/
void set(String key, String value, long timeout);
/**
* 获取缓存
*
* @param key 缓存KEY
* @return 缓存内容
*/
String get(String key);
/**
* 是否存在key,如果对应key的value值已过期,也返回false
*
* @param key 缓存KEY
* @return true:存在key,并且value没过期;false:key不存在或者已过期
*/
boolean containsKey(String key);
/**
* 清理过期的缓存
*/
default void pruneCache() {
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthCacheConfig.java
================================================
package me.zhyd.oauth.cache;
/**
* AuthCache配置类
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.10.0
*/
public class AuthCacheConfig {
/**
* 默认缓存过期时间:3分钟
* 鉴于授权过程中,根据个人的操作习惯,或者授权平台的不同(google等),每个授权流程的耗时也有差异,不过单个授权流程一般不会太长
* 本缓存工具默认的过期时间设置为3分钟,即程序默认认为3分钟内的授权有效,超过3分钟则默认失效,失效后删除
*/
public static long timeout = 3 * 60 * 1000;
/**
* 是否开启定时{@link AuthDefaultCache#pruneCache()}的任务
*/
public static boolean schedulePrune = true;
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthCacheScheduler.java
================================================
package me.zhyd.oauth.cache;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 缓存调度器
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.9.3
*/
public enum AuthCacheScheduler {
/**
* 当前实例
*/
INSTANCE;
private AtomicInteger cacheTaskNumber = new AtomicInteger(1);
private ScheduledExecutorService scheduler;
AuthCacheScheduler() {
create();
}
private void create() {
this.shutdown();
this.scheduler = new ScheduledThreadPoolExecutor(10, r -> new Thread(r, String.format("JustAuth-Task-%s", cacheTaskNumber.getAndIncrement())));
}
public void shutdown() {
if (null != scheduler) {
this.scheduler.shutdown();
}
}
public void schedule(Runnable task, long delay) {
this.scheduler.scheduleAtFixedRate(task, delay, delay, TimeUnit.MILLISECONDS);
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthDefaultCache.java
================================================
package me.zhyd.oauth.cache;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* 默认的缓存实现
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.9.3
*/
public class AuthDefaultCache implements AuthCache {
/**
* state cache
*/
private static Map<String, CacheState> stateCache = new ConcurrentHashMap<>();
private final ReentrantReadWriteLock cacheLock = new ReentrantReadWriteLock(true);
private final Lock writeLock = cacheLock.writeLock();
private final Lock readLock = cacheLock.readLock();
public AuthDefaultCache() {
if (AuthCacheConfig.schedulePrune) {
this.schedulePrune(AuthCacheConfig.timeout);
}
}
/**
* 设置缓存
*
* @param key 缓存KEY
* @param value 缓存内容
*/
@Override
public void set(String key, String value) {
set(key, value, AuthCacheConfig.timeout);
}
/**
* 设置缓存
*
* @param key 缓存KEY
* @param value 缓存内容
* @param timeout 指定缓存过期时间(毫秒)
*/
@Override
public void set(String key, String value, long timeout) {
writeLock.lock();
try {
stateCache.put(key, new CacheState(value, timeout));
} finally {
writeLock.unlock();
}
}
/**
* 获取缓存
*
* @param key 缓存KEY
* @return 缓存内容
*/
@Override
public String get(String key) {
readLock.lock();
try {
CacheState cacheState = stateCache.get(key);
if (null == cacheState || cacheState.isExpired()) {
return null;
}
return cacheState.getState();
} finally {
readLock.unlock();
}
}
/**
* 是否存在key,如果对应key的value值已过期,也返回false
*
* @param key 缓存KEY
* @return true:存在key,并且value没过期;false:key不存在或者已过期
*/
@Override
public boolean containsKey(String key) {
readLock.lock();
try {
CacheState cacheState = stateCache.get(key);
return null != cacheState && !cacheState.isExpired();
} finally {
readLock.unlock();
}
}
/**
* 清理过期的缓存
*/
@Override
public void pruneCache() {
Iterator<CacheState> values = stateCache.values().iterator();
CacheState cacheState;
while (values.hasNext()) {
cacheState = values.next();
if (cacheState.isExpired()) {
values.remove();
}
}
}
/**
* 定时清理
*
* @param delay 间隔时长,单位毫秒
*/
public void schedulePrune(long delay) {
AuthCacheScheduler.INSTANCE.schedule(this::pruneCache, delay);
}
@Getter
@Setter
private class CacheState implements Serializable {
private String state;
private long expire;
CacheState(String state, long expire) {
this.state = state;
// 实际过期时间等于当前时间加上有效期
this.expire = System.currentTimeMillis() + expire;
}
boolean isExpired() {
return System.currentTimeMillis() > this.expire;
}
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthDefaultStateCache.java
================================================
package me.zhyd.oauth.cache;
/**
* 默认的state缓存实现
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.10.0
*/
public enum AuthDefaultStateCache implements AuthStateCache {
/**
* 当前实例
*/
INSTANCE;
private AuthCache authCache;
AuthDefaultStateCache() {
authCache = new AuthDefaultCache();
}
/**
* 存入缓存
*
* @param key 缓存key
* @param value 缓存内容
*/
@Override
public void cache(String key, String value) {
authCache.set(key, value);
}
/**
* 存入缓存
*
* @param key 缓存key
* @param value 缓存内容
* @param timeout 指定缓存过期时间(毫秒)
*/
@Override
public void cache(String key, String value, long timeout) {
authCache.set(key, value, timeout);
}
/**
* 获取缓存内容
*
* @param key 缓存key
* @return 缓存内容
*/
@Override
public String get(String key) {
return authCache.get(key);
}
/**
* 是否存在key,如果对应key的value值已过期,也返回false
*
* @param key 缓存key
* @return true:存在key,并且value没过期;false:key不存在或者已过期
*/
@Override
public boolean containsKey(String key) {
return authCache.containsKey(key);
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/AuthStateCache.java
================================================
package me.zhyd.oauth.cache;
/**
* <p>
* State缓存接口,方便用户扩展
* </p>
*
* @author yangkai.shen
* @since 1.10.0
*/
public interface AuthStateCache {
/**
* 存入缓存
*
* @param key 缓存key
* @param value 缓存内容
*/
void cache(String key, String value);
/**
* 存入缓存
*
* @param key 缓存key
* @param value 缓存内容
* @param timeout 指定缓存过期时间(毫秒)
*/
void cache(String key, String value, long timeout);
/**
* 获取缓存内容
*
* @param key 缓存key
* @return 缓存内容
*/
String get(String key);
/**
* 是否存在key,如果对应key的value值已过期,也返回false
*
* @param key 缓存key
* @return true:存在key,并且value没过期;false:key不存在或者已过期
*/
boolean containsKey(String key);
}
================================================
FILE: src/main/java/me/zhyd/oauth/cache/package-info.java
================================================
/**
* JustAuth 缓存实现, 提供基础的基于ConcurrentHashMap + ScheduledExecutorService 实现的定时缓存。
* 同时对外暴露{@code AuthStateCache}接口,可进行对缓存实现的自定义。
*/
package me.zhyd.oauth.cache;
================================================
FILE: src/main/java/me/zhyd/oauth/config/AuthConfig.java
================================================
package me.zhyd.oauth.config;
import com.xkcoding.http.config.HttpConfig;
import lombok.*;
import me.zhyd.oauth.model.AuthCallback;
import me.zhyd.oauth.utils.StringUtils;
import java.util.List;
/**
* JustAuth配置类
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.8
*/
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AuthConfig {
/**
* 客户端id:对应各平台的appKey
*/
private String clientId;
/**
* 客户端Secret:对应各平台的appSecret
*/
private String clientSecret;
/**
* 登录成功后的回调地址
*/
private String redirectUri;
/**
* 支付宝公钥:当选择支付宝登录时,该值可用
* 对应“RSA2(SHA256)密钥”中的“支付宝公钥”
*
* @deprecated 请使用AuthAlipayRequest的构造方法设置"alipayPublicKey"
*/
@Deprecated
private String alipayPublicKey;
/**
* 是否需要申请unionid,目前只针对qq登录
* 注:qq授权登录时,获取unionid需要单独发送邮件申请权限。如果个人开发者账号中申请了该权限,可以将该值置为true,在获取openId时就会同步获取unionId
* 参考链接:http://wiki.connect.qq.com/unionid%E4%BB%8B%E7%BB%8D
* <p>
* 1.7.1版本新增参数
*/
private boolean unionId;
/**
* Stack Overflow Key
* <p>
*
* @since 1.9.0
*/
private String stackOverflowKey;
/**
* 企业微信,授权方的网页应用ID
*
* @since 1.10.0
*/
private String agentId;
/**
* 企业微信第三方授权用户类型,member|admin
*
* @since 1.10.0
*/
private String usertype;
/**
* 域名前缀。
* <p>
* 使用 Coding 登录和 Okta 登录时,需要传该值。
* <p>
* Coding 登录:团队域名前缀,比如以“ https://justauth.coding.net ”为例,{@code domainPrefix} = justauth
* <p>
* Okta 登录:Okta 账号域名前缀,比如以“ https://justauth.okta.com ”为例,{@code domainPrefix} = justauth
*
* @since 1.16.0
*/
private String domainPrefix;
/**
* 针对国外服务可以单独设置代理
* HttpConfig config = new HttpConfig();
* config.setProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 10080)));
* config.setTimeout(15000);
*
* @since 1.15.5
*/
private HttpConfig httpConfig;
/**
* 忽略校验 {@code state} 参数,默认不开启。当 {@code ignoreCheckState} 为 {@code true} 时,
* {@link me.zhyd.oauth.request.AuthDefaultRequest#login(AuthCallback)} 将不会校验 {@code state} 的合法性。
* <p>
* 使用场景:当且仅当使用自实现 {@code state} 校验逻辑时开启
* <p>
* 以下场景使用方案仅作参考:
* 1. 授权、登录为同端,并且全部使用 JustAuth 实现时,该值建议设为 {@code false};
* 2. 授权和登录为不同端实现时,比如前端页面拼装 {@code authorizeUrl},并且前端自行对{@code state}进行校验,
* 后端只负责使用{@code code}获取用户信息时,该值建议设为 {@code true};
*
* <strong>如非特殊需要,不建议开启这个配置</strong>
* <p>
* 该方案主要为了解决以下类似场景的问题:
*
* @see <a href="https://github.com/justauth/JustAuth/issues/83">https://github.com/justauth/JustAuth/issues/83</a>
* @since 1.15.6
*/
private boolean ignoreCheckState;
/**
* 支持自定义授权平台的 scope 内容
*
* @since 1.15.7
*/
private List<String> scopes;
/**
* 设备ID, 设备唯一标识ID
*
* @since 1.15.8
*/
private String deviceId;
/**
* 喜马拉雅:客户端操作系统类型,1-iOS系统,2-Android系统,3-Web
*
* @since 1.15.9
*/
private Integer clientOsType;
/**
* 喜马拉雅:客户端包名,如果 {@link AuthConfig#clientOsType} 为1或2时必填。对Android客户端是包名,对IOS客户端是Bundle ID
*
* @since 1.15.9
*/
private String packId;
/**
* 是否开启 PKCE 模式,该配置仅用于支持 PKCE 模式的平台,针对无服务应用,不推荐使用隐式授权,推荐使用 PKCE 模式
*
* @since 1.15.9
*/
private boolean pkce;
/**
* Okta 授权服务器的 ID, 默认为 default。如果要使用自定义授权服务,此处传实际的授权服务器 ID(一个随机串)
* <p>
* 创建自定义授权服务器,请参考:
* <p>
* ① https://developer.okta.com/docs/concepts/auth-servers
* <p>
* ② https://developer.okta.com/docs/guides/customize-authz-server
*
* @since 1.16.0
*/
private String authServerId;
/**
* 忽略校验 {@code redirectUri} 参数,默认不开启。当 {@code ignoreCheckRedirectUri} 为 {@code true} 时,
* {@link me.zhyd.oauth.utils.AuthChecker#checkConfig(AuthConfig, AuthSource)} 将不会校验 {@code redirectUri} 的合法性。
*
* @since 1.16.1
*/
private boolean ignoreCheckRedirectUri;
/**
* 适配 builder 模式 set 值的情况
*
* @return authServerId
*/
public String getAuthServerId() {
return StringUtils.isEmpty(authServerId) ? "default" : authServerId;
}
/**
* Microsoft Entra ID(原微软 AAD)中的租户 ID
*/
private String tenantId;
/**
* 苹果开发者账号中的密钥标识符
* @see <a href="https://developer.apple.com/help/account/configure-app-capabilities/create-a-sign-in-with-apple-private-key/">create-a-sign-in-with-apple-private-key</a>
*/
private String kid;
/**
* 苹果开发者账号中的团队ID
* @see <a href="https://developer.apple.com/help/glossary/team-id/">team id</a>
*/
private String teamId;
/**
* 新版企业微信 Web 登录时的参数,
*
* 登录类型。ServiceApp:服务商登录;CorpApp:企业自建/代开发应用登录。
* @see <a href="https://developer.work.weixin.qq.com/document/path/98152">https://developer.work.weixin.qq.com/document/path/98152</a>
* @since 1.16.7
*/
private String loginType = "CorpApp";
/**
* 企业微信平台的语言编码
*
* @since 1.16.7
*/
private String lang = "zh";
/**
* 钉钉平台参数:控制输出特定类型的组织列表,org_type=management 表示只输出有管理权限的组织。
*
* scope包含corpid时该参数存在意义。
*
* @see <a href="https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug">https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug</a>
* @since 1.16.7
*/
private String dingTalkOrgType;
/**
* 钉钉平台参数:用于指定用户需要选择的组织。
*
* scope包含corpid时该参数存在意义。传入的corpId需要是当前用户所在的组织。
*
* @see <a href="https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug">https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug</a>
* @since 1.16.7
*/
private String dingTalkCorpId;
/**
* 钉钉平台参数:true表示专属帐号登录,展示组织代码输入页。
*
* @see <a href="https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug">https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug</a>
* @since 1.16.7
*/
private boolean dingTalkExclusiveLogin;
/**
* 钉钉平台参数:开启了专属帐号功能的组织corpId。
*
* scope包含corpid时该参数存在意义。传入的corpId需要是当前用户所在的组织。
*
* @see <a href="https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug">https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug</a>
* @since 1.16.7
*/
private String dingTalkExclusiveCorpId;
}
================================================
FILE: src/main/java/me/zhyd/oauth/config/AuthDefaultSource.java
================================================
package me.zhyd.oauth.config;
import me.zhyd.oauth.enums.AuthResponseStatus;
import me.zhyd.oauth.exception.AuthException;
import me.zhyd.oauth.request.*;
/**
* JustAuth内置的各api需要的url, 用枚举类分平台类型管理
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.0
*/
public enum AuthDefaultSource implements AuthSource {
/**
* Github
*/
GITHUB {
@Override
public String authorize() {
return "https://github.com/login/oauth/authorize";
}
@Override
public String accessToken() {
return "https://github.com/login/oauth/access_token";
}
@Override
public String userInfo() {
return "https://api.github.com/user";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthGithubRequest.class;
}
},
/**
* 新浪微博
*/
WEIBO {
@Override
public String authorize() {
return "https://api.weibo.com/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://api.weibo.com/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://api.weibo.com/2/users/show.json";
}
@Override
public String revoke() {
return "https://api.weibo.com/oauth2/revokeoauth2";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeiboRequest.class;
}
},
/**
* gitee
*/
GITEE {
@Override
public String authorize() {
return "https://gitee.com/oauth/authorize";
}
@Override
public String accessToken() {
return "https://gitee.com/oauth/token";
}
@Override
public String userInfo() {
return "https://gitee.com/api/v5/user";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthGiteeRequest.class;
}
},
/**
* 钉钉扫码登录
*/
DINGTALK {
@Override
public String authorize() {
return "https://oapi.dingtalk.com/connect/qrconnect";
}
@Override
public String accessToken() {
throw new AuthException(AuthResponseStatus.UNSUPPORTED);
}
@Override
public String userInfo() {
return "https://oapi.dingtalk.com/sns/getuserinfo_bycode";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthDingTalkRequest.class;
}
},
/**
* 新版钉钉扫码登录
*/
DINGTALK_V2 {
@Override
public String authorize() {
return "https://login.dingtalk.com/oauth2/challenge.htm";
}
@Override
public String accessToken() {
return "https://api.dingtalk.com/v1.0/oauth2/userAccessToken";
}
@Override
public String userInfo() {
return "https://api.dingtalk.com/v1.0/contact/users/me";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthDingTalkV2Request.class;
}
},
/**
* 钉钉账号登录
*/
DINGTALK_ACCOUNT {
@Override
public String authorize() {
return "https://oapi.dingtalk.com/connect/oauth2/sns_authorize";
}
@Override
public String accessToken() {
return DINGTALK.accessToken();
}
@Override
public String userInfo() {
return DINGTALK.userInfo();
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthDingTalkAccountRequest.class;
}
},
/**
* 百度
*/
BAIDU {
@Override
public String authorize() {
return "https://openapi.baidu.com/oauth/2.0/authorize";
}
@Override
public String accessToken() {
return "https://openapi.baidu.com/oauth/2.0/token";
}
@Override
public String userInfo() {
return "https://openapi.baidu.com/rest/2.0/passport/users/getInfo";
}
@Override
public String revoke() {
return "https://openapi.baidu.com/rest/2.0/passport/auth/revokeAuthorization";
}
@Override
public String refresh() {
return "https://openapi.baidu.com/oauth/2.0/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthBaiduRequest.class;
}
},
/**
* csdn
*/
CSDN {
@Override
public String authorize() {
return "https://api.csdn.net/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://api.csdn.net/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://api.csdn.net/user/getinfo";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthCsdnRequest.class;
}
},
/**
* Coding,
* <p>
* 参考 https://help.coding.net/docs/project/open/oauth.html#%E7%94%A8%E6%88%B7%E6%8E%88%E6%9D%83 中的说明,
* 新版的 coding API 地址需要传入用户团队名,这儿使用动态参数,方便在 request 中使用
*/
CODING {
@Override
public String authorize() {
return "https://%s.coding.net/oauth_authorize.html";
}
@Override
public String accessToken() {
return "https://%s.coding.net/api/oauth/access_token";
}
@Override
public String userInfo() {
return "https://%s.coding.net/api/account/current_user";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthCodingRequest.class;
}
},
/**
* oschina 开源中国
*/
OSCHINA {
@Override
public String authorize() {
return "https://www.oschina.net/action/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://www.oschina.net/action/openapi/token";
}
@Override
public String userInfo() {
return "https://www.oschina.net/action/openapi/user";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthOschinaRequest.class;
}
},
/**
* 支付宝
*/
ALIPAY {
@Override
public String authorize() {
return "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm";
}
@Override
public String accessToken() {
return "https://openapi.alipay.com/gateway.do";
}
@Override
public String userInfo() {
return "https://openapi.alipay.com/gateway.do";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthAlipayRequest.class;
}
},
/**
* QQ
*/
QQ {
@Override
public String authorize() {
return "https://graph.qq.com/oauth2.0/authorize";
}
@Override
public String accessToken() {
return "https://graph.qq.com/oauth2.0/token";
}
@Override
public String userInfo() {
return "https://graph.qq.com/user/get_user_info";
}
@Override
public String refresh() {
return "https://graph.qq.com/oauth2.0/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthQqRequest.class;
}
},
/**
* 微信开放平台
*/
WECHAT_OPEN {
@Override
public String authorize() {
return "https://open.weixin.qq.com/connect/qrconnect";
}
@Override
public String accessToken() {
return "https://api.weixin.qq.com/sns/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://api.weixin.qq.com/sns/userinfo";
}
@Override
public String refresh() {
return "https://api.weixin.qq.com/sns/oauth2/refresh_token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatOpenRequest.class;
}
},
/**
* 微信公众平台
*/
WECHAT_MP {
@Override
public String authorize() {
return "https://open.weixin.qq.com/connect/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://api.weixin.qq.com/sns/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://api.weixin.qq.com/sns/userinfo";
}
@Override
public String refresh() {
return "https://api.weixin.qq.com/sns/oauth2/refresh_token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatMpRequest.class;
}
},
/**
* 淘宝
*/
TAOBAO {
@Override
public String authorize() {
return "https://oauth.taobao.com/authorize";
}
@Override
public String accessToken() {
return "https://oauth.taobao.com/token";
}
@Override
public String userInfo() {
throw new AuthException(AuthResponseStatus.UNSUPPORTED);
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthTaobaoRequest.class;
}
},
/**
* Google
* 端点地址:https://accounts.google.com/.well-known/openid-configuration
*/
GOOGLE {
@Override
public String authorize() {
return "https://accounts.google.com/o/oauth2/v2/auth";
}
@Override
public String accessToken() {
return "https://oauth2.googleapis.com/token";
}
@Override
public String userInfo() {
return "https://openidconnect.googleapis.com/v1/userinfo";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthGoogleRequest.class;
}
},
/**
* Facebook
*/
FACEBOOK {
@Override
public String authorize() {
return "https://www.facebook.com/v18.0/dialog/oauth";
}
@Override
public String accessToken() {
return "https://graph.facebook.com/v18.0/oauth/access_token";
}
@Override
public String userInfo() {
return "https://graph.facebook.com/v18.0/me";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthFacebookRequest.class;
}
},
/**
* 抖音
*/
DOUYIN {
@Override
public String authorize() {
return "https://open.douyin.com/platform/oauth/connect";
}
@Override
public String accessToken() {
return "https://open.douyin.com/oauth/access_token/";
}
@Override
public String userInfo() {
return "https://open.douyin.com/oauth/userinfo/";
}
@Override
public String refresh() {
return "https://open.douyin.com/oauth/refresh_token/";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthDouyinRequest.class;
}
},
/**
* 领英
*/
LINKEDIN {
@Override
public String authorize() {
return "https://www.linkedin.com/oauth/v2/authorization";
}
@Override
public String accessToken() {
return "https://www.linkedin.com/oauth/v2/accessToken";
}
@Override
public String userInfo() {
return "https://api.linkedin.com/v2/me";
}
@Override
public String refresh() {
return "https://www.linkedin.com/oauth/v2/accessToken";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthLinkedinRequest.class;
}
},
/**
* 微软
*/
MICROSOFT {
@Override
public String authorize() {
return "https://login.microsoftonline.com/%s/oauth2/v2.0/authorize";
}
@Override
public String accessToken() {
return "https://login.microsoftonline.com/%s/oauth2/v2.0/token";
}
@Override
public String userInfo() {
return "https://graph.microsoft.com/v1.0/me";
}
@Override
public String refresh() {
return "https://login.microsoftonline.com/%s/oauth2/v2.0/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthMicrosoftRequest.class;
}
},
/**
* 微软中国(世纪互联)
*/
MICROSOFT_CN {
@Override
public String authorize() {
return "https://login.partner.microsoftonline.cn/%s/oauth2/v2.0/authorize";
}
@Override
public String accessToken() {
return "https://login.partner.microsoftonline.cn/%s/oauth2/v2.0/token";
}
@Override
public String userInfo() {
return "https://microsoftgraph.chinacloudapi.cn/v1.0/me";
}
@Override
public String refresh() {
return "https://login.partner.microsoftonline.cn/%s/oauth2/v2.0/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() { return AuthMicrosoftCnRequest.class; }
},
/**
* 小米
*/
MI {
@Override
public String authorize() {
return "https://account.xiaomi.com/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://account.xiaomi.com/oauth2/token";
}
@Override
public String userInfo() {
return "https://open.account.xiaomi.com/user/profile";
}
@Override
public String refresh() {
return "https://account.xiaomi.com/oauth2/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthMiRequest.class;
}
},
/**
* 今日头条
*/
TOUTIAO {
@Override
public String authorize() {
return "https://open.snssdk.com/auth/authorize";
}
@Override
public String accessToken() {
return "https://open.snssdk.com/auth/token";
}
@Override
public String userInfo() {
return "https://open.snssdk.com/data/user_profile";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthToutiaoRequest.class;
}
},
/**
* Teambition
*/
TEAMBITION {
@Override
public String authorize() {
return "https://account.teambition.com/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://account.teambition.com/oauth2/access_token";
}
@Override
public String refresh() {
return "https://account.teambition.com/oauth2/refresh_token";
}
@Override
public String userInfo() {
return "https://api.teambition.com/users/me";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthTeambitionRequest.class;
}
},
/**
* 人人网
*/
RENREN {
@Override
public String authorize() {
return "https://graph.renren.com/oauth/authorize";
}
@Override
public String accessToken() {
return "https://graph.renren.com/oauth/token";
}
@Override
public String refresh() {
return "https://graph.renren.com/oauth/token";
}
@Override
public String userInfo() {
return "https://api.renren.com/v2/user/get";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthRenrenRequest.class;
}
},
/**
* Pinterest
*/
PINTEREST {
@Override
public String authorize() {
return "https://api.pinterest.com/oauth";
}
@Override
public String accessToken() {
return "https://api.pinterest.com/v1/oauth/token";
}
@Override
public String userInfo() {
return "https://api.pinterest.com/v1/me";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthPinterestRequest.class;
}
},
/**
* Stack Overflow
*/
STACK_OVERFLOW {
@Override
public String authorize() {
return "https://stackoverflow.com/oauth";
}
@Override
public String accessToken() {
return "https://stackoverflow.com/oauth/access_token/json";
}
@Override
public String userInfo() {
return "https://api.stackexchange.com/2.2/me";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthStackOverflowRequest.class;
}
},
/**
* 华为
*
* 当前方式未来可能被废弃,建议使用 {@link this#HUAWEI_V3}
*
* @since 1.10.0
*/
@Deprecated
HUAWEI {
@Override
public String authorize() {
return "https://oauth-login.cloud.huawei.com/oauth2/v2/authorize";
}
@Override
public String accessToken() {
return "https://oauth-login.cloud.huawei.com/oauth2/v2/token";
}
@Override
public String userInfo() {
return "https://api.vmall.com/rest.php";
}
@Override
public String refresh() {
return "https://oauth-login.cloud.huawei.com/oauth2/v2/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthHuaweiRequest.class;
}
},
/**
* 华为最新版本的 API
*
* @since 1.16.7
*/
HUAWEI_V3 {
@Override
public String authorize() {
return "https://oauth-login.cloud.huawei.com/oauth2/v3/authorize";
}
@Override
public String accessToken() {
return "https://oauth-login.cloud.huawei.com/oauth2/v3/token";
}
@Override
public String userInfo() {
return "https://account.cloud.huawei.com/rest.php";
}
@Override
public String refresh() {
return "https://oauth-login.cloud.huawei.com/oauth2/v3/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthHuaweiV3Request.class;
}
},
/**
* 企业微信二维码登录
*
* @since 1.10.0
*/
WECHAT_ENTERPRISE {
@Override
public String authorize() {
return "https://open.work.weixin.qq.com/wwopen/sso/qrConnect";
}
@Override
public String accessToken() {
return "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
}
@Override
public String userInfo() {
return "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatEnterpriseQrcodeRequest.class;
}
},
/**
* 新版企业微信 Web 登录(扫码),参考 <a href="https://developer.work.weixin.qq.com/document/path/98152">https://developer.work.weixin.qq.com/document/path/98152</a>
*
* @since 1.16.7
*/
WECHAT_ENTERPRISE_V2 {
@Override
public String authorize() {
return "https://login.work.weixin.qq.com/wwlogin/sso/login";
}
@Override
public String accessToken() {
return "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
}
@Override
public String userInfo() {
return "https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatEnterpriseQrcodeV2Request.class;
}
},
/**
* 企业微信二维码第三方登录
*/
WECHAT_ENTERPRISE_QRCODE_THIRD {
/**
* 授权的api
*
* @return url
*/
@Override
public String authorize() {
return "https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect";
}
/**
* 获取accessToken的api
*
* @return url
*/
@Override
public String accessToken() {
return "https://qyapi.weixin.qq.com/cgi-bin/service/get_provider_token";
}
/**
* 获取用户信息的api
*
* @return url
*/
@Override
public String userInfo() {
return "https://qyapi.weixin.qq.com/cgi-bin/service/get_login_info";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatEnterpriseThirdQrcodeRequest.class;
}
},
/**
* 企业微信网页登录
*/
WECHAT_ENTERPRISE_WEB {
@Override
public String authorize() {
return "https://open.weixin.qq.com/connect/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
}
@Override
public String userInfo() {
return "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWeChatEnterpriseWebRequest.class;
}
},
/**
* 酷家乐
*
* @since 1.11.0
*/
KUJIALE {
@Override
public String authorize() {
return "https://oauth.kujiale.com/oauth2/show";
}
@Override
public String accessToken() {
return "https://oauth.kujiale.com/oauth2/auth/token";
}
@Override
public String userInfo() {
return "https://oauth.kujiale.com/oauth2/openapi/user";
}
@Override
public String refresh() {
return "https://oauth.kujiale.com/oauth2/auth/token/refresh";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthKujialeRequest.class;
}
},
/**
* Gitlab
*
* @since 1.11.0
*/
GITLAB {
@Override
public String authorize() {
return "https://gitlab.com/oauth/authorize";
}
@Override
public String accessToken() {
return "https://gitlab.com/oauth/token";
}
@Override
public String userInfo() {
return "https://gitlab.com/api/v4/user";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthGitlabRequest.class;
}
},
/**
* 美团
*
* @since 1.12.0
*/
MEITUAN {
@Override
public String authorize() {
return "https://openapi.waimai.meituan.com/oauth/authorize";
}
@Override
public String accessToken() {
return "https://openapi.waimai.meituan.com/oauth/access_token";
}
@Override
public String userInfo() {
return "https://openapi.waimai.meituan.com/oauth/userinfo";
}
@Override
public String refresh() {
return "https://openapi.waimai.meituan.com/oauth/refresh_token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthMeituanRequest.class;
}
},
/**
* 饿了么
* <p>
* 注:集成的是正式环境,非沙箱环境
*
* @since 1.12.0
*/
ELEME {
@Override
public String authorize() {
return "https://open-api.shop.ele.me/authorize";
}
@Override
public String accessToken() {
return "https://open-api.shop.ele.me/token";
}
@Override
public String userInfo() {
return "https://open-api.shop.ele.me/api/v1/";
}
@Override
public String refresh() {
return "https://open-api.shop.ele.me/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthElemeRequest.class;
}
},
/**
* Twitter
*
* @since 1.13.0
*/
TWITTER {
@Override
public String authorize() {
return "https://api.twitter.com/oauth/authenticate";
}
@Override
public String accessToken() {
return "https://api.twitter.com/oauth/access_token";
}
@Override
public String userInfo() {
return "https://api.twitter.com/1.1/account/verify_credentials.json";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthTwitterRequest.class;
}
},
/**
* 飞书平台,企业自建应用授权登录,原逻辑由 beacon 集成于 1.14.0 版,但最新的飞书 api 已修改,并且飞书平台一直为 {@code Deprecated} 状态
* <p>
* 所以,最终修改该平台的实际发布版本为 1.15.9
*
* @since 1.15.9
*/
FEISHU {
@Override
public String authorize() {
return "https://open.feishu.cn/open-apis/authen/v1/index";
}
@Override
public String accessToken() {
return "https://open.feishu.cn/open-apis/authen/v1/access_token";
}
@Override
public String userInfo() {
return "https://open.feishu.cn/open-apis/authen/v1/user_info";
}
@Override
public String refresh() {
return "https://open.feishu.cn/open-apis/authen/v1/refresh_access_token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthFeishuRequest.class;
}
},
/**
* 京东
*
* @since 1.15.0
*/
JD {
@Override
public String authorize() {
return "https://open-oauth.jd.com/oauth2/to_login";
}
@Override
public String accessToken() {
return "https://open-oauth.jd.com/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://api.jd.com/routerjson";
}
@Override
public String refresh() {
return "https://open-oauth.jd.com/oauth2/refresh_token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthJdRequest.class;
}
},
/**
* 阿里云
*/
ALIYUN {
@Override
public String authorize() {
return "https://signin.aliyun.com/oauth2/v1/auth";
}
@Override
public String accessToken() {
return "https://oauth.aliyun.com/v1/token";
}
@Override
public String userInfo() {
return "https://oauth.aliyun.com/v1/userinfo";
}
@Override
public String refresh() {
return "https://oauth.aliyun.com/v1/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthAliyunRequest.class;
}
},
/**
* 喜马拉雅
*/
XMLY {
@Override
public String authorize() {
return "https://api.ximalaya.com/oauth2/js/authorize";
}
@Override
public String accessToken() {
return "https://api.ximalaya.com/oauth2/v2/access_token";
}
@Override
public String userInfo() {
return "https://api.ximalaya.com/profile/user_info";
}
@Override
public String refresh() {
return "https://oauth.aliyun.com/v1/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthXmlyRequest.class;
}
},
/**
* Amazon
*
* @since 1.16.0
*/
AMAZON {
@Override
public String authorize() {
return "https://www.amazon.com/ap/oa";
}
@Override
public String accessToken() {
return "https://api.amazon.com/auth/o2/token";
}
@Override
public String userInfo() {
return "https://api.amazon.com/user/profile";
}
@Override
public String refresh() {
return "https://api.amazon.com/auth/o2/token";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthAmazonRequest.class;
}
},
/**
* Slack
*
* @since 1.16.0
*/
SLACK {
@Override
public String authorize() {
return "https://slack.com/oauth/v2/authorize";
}
/**
* 该 API 获取到的是 access token
*
* https://slack.com/api/oauth.token 获取到的是 workspace token
*
* @return String
*/
@Override
public String accessToken() {
return "https://slack.com/api/oauth.v2.access";
}
@Override
public String userInfo() {
return "https://slack.com/api/users.info";
}
@Override
public String revoke() {
return "https://slack.com/api/auth.revoke";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthSlackRequest.class;
}
},
/**
* line
*
* @since 1.16.0
*/
LINE {
@Override
public String authorize() {
return "https://access.line.me/oauth2/v2.1/authorize";
}
@Override
public String accessToken() {
return "https://api.line.me/oauth2/v2.1/token";
}
@Override
public String userInfo() {
return "https://api.line.me/v2/profile";
}
@Override
public String refresh() {
return "https://api.line.me/oauth2/v2.1/token";
}
@Override
public String revoke() {
return "https://api.line.me/oauth2/v2.1/revoke";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthLineRequest.class;
}
},
/**
* Okta,
* <p>
* 团队/组织的域名不同,此处通过配置动态组装
*
* @since 1.16.0
*/
OKTA {
@Override
public String authorize() {
return "https://%s.okta.com/oauth2/%s/v1/authorize";
}
@Override
public String accessToken() {
return "https://%s.okta.com/oauth2/%s/v1/token";
}
@Override
public String refresh() {
return "https://%s.okta.com/oauth2/%s/v1/token";
}
@Override
public String userInfo() {
return "https://%s.okta.com/oauth2/%s/v1/userinfo";
}
@Override
public String revoke() {
return "https://%s.okta.com/oauth2/%s/v1/revoke";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthOktaRequest.class;
}
},
/**
* 程序员客栈
*
* @since 1.16.2
*/
PROGINN {
@Override
public String authorize() {
return "https://www.proginn.com/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://www.proginn.com/oauth2/access_token";
}
@Override
public String userInfo() {
return "https://www.proginn.com/openapi/user/basic_info";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthProginnRequest.class;
}
},
/**
* 爱发电 <a href="https://afdian.net/">爱发电</a>
*/
AFDIAN {
@Override
public String authorize() {
return "https://afdian.net/oauth2/authorize";
}
@Override
public String accessToken() {
return "https://afdian.net/api/oauth2/access_token";
}
@Override
public String userInfo() {
return "";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthProginnRequest.class;
}
},
APPLE {
@Override
public String authorize() {
return "https://appleid.apple.com/auth/authorize";
}
/**
* @see <a href="https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens">generate_and_validate_tokens</a>
*/
@Override
public String accessToken() {
return "https://appleid.apple.com/auth/token";
}
@Override
public String userInfo() {
return "";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthAppleRequest.class;
}
},
FIGMA{
@Override
public String authorize() {
return "https://www.figma.com/oauth";
}
@Override
public String accessToken() {
return "https://www.figma.com/api/oauth/token";
}
@Override
public String userInfo() {
return "https://api.figma.com/v1/me";
}
@Override
public String refresh() {
return "https://www.figma.com/api/oauth/refresh";
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthFigmaRequest.class;
}
},
/**
* 微信小程序授权登录
* @since yudaocode
*/
WECHAT_MINI_PROGRAM {
@Override
public String authorize() {
// 参见 https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html 文档
throw new UnsupportedOperationException("不支持获取授权 url,请使用小程序内置函数 wx.login() 登录获取 code");
}
@Override
public String accessToken() {
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html 文档
// 获取 openid, unionId , session_key 等字段
return "https://api.weixin.qq.com/sns/jscode2session";
}
@Override
public String userInfo() {
// 参见 https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html 文档
throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 wx.getUserProfile() 获取用户信息");
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return AuthWechatMiniProgramRequest.class;
}
},
/**
* QQ小程序授权登录
*/
QQ_MINI_PROGRAM {
@Override
public String authorize() {
// 参见 https://q.qq.com/wiki/develop/miniprogram/frame/open_ability/open_userinfo.html 文档
throw new UnsupportedOperationException("不支持获取授权 url,请使用小程序内置函数 qq.login() 登录获取 code");
}
@Override
public String accessToken() {
// 参见 https://q.qq.com/wiki/develop/miniprogram/server/open_port/port_login.html 文档
// 获取 openid, unionId , session_key 等字段
return "https://api.q.qq.com/sns/jscode2session";
}
@Override
public String userInfo() {
// 参见 https://q.qq.com/wiki/develop/miniprogram/API/open_port/port_userinfo.html 文档
throw new UnsupportedOperationException("不支持获取用户信息 url,请使用小程序内置函数 qq.getUserInfo() 获取用户信息");
}
@Override
public Class<? extends AuthDefaultRequest> getTargetClass() {
return null;
}
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/config/AuthSource.java
================================================
package me.zhyd.oauth.config;
import me.zhyd.oauth.enums.AuthResponseStatus;
import me.zhyd.oauth.exception.AuthException;
import me.zhyd.oauth.model.AuthCallback;
import me.zhyd.oauth.request.AuthDefaultRequest;
/**
* OAuth平台的API地址的统一接口,提供以下方法:
* 1) {@link AuthSource#authorize()}: 获取授权url. 必须实现
* 2) {@link AuthSource#accessToken()}: 获取accessToken的url. 必须实现
* 3) {@link AuthSource#userInfo()}: 获取用户信息的url. 必须实现
* 4) {@link AuthSource#revoke()}: 获取取消授权的url. 非必须实现接口(部分平台不支持)
* 5) {@link AuthSource#refresh()}: 获取刷新授权的url. 非必须实现接口(部分平台不支持)
* <p>
* 注:
* ①、如需通过JustAuth扩展实现第三方授权,请参考{@link AuthDefaultSource}自行创建对应的枚举类并实现{@link AuthSource}接口
* ②、如果不是使用的枚举类,那么在授权成功后获取用户信息时,需要单独处理source字段的赋值
* ③、如果扩展了对应枚举类时,在{@link me.zhyd.oauth.request.AuthRequest#login(AuthCallback)}中可以通过{@code xx.toString()}获取对应的source
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0
* @since 1.12.0
*/
public interface AuthSource {
/**
* 授权的api
*
* @return url
*/
String authorize();
/**
* 获取accessToken的api
*
* @return url
*/
String accessToken();
/**
* 获取用户信息的api
*
* @return url
*/
String userInfo();
/**
* 取消授权的api
*
* @return url
*/
default String revoke() {
throw new AuthException(AuthResponseStatus.UNSUPPORTED);
}
/**
* 刷新授权的api
*
* @return url
*/
default String refresh() {
throw new AuthException(AuthResponseStatus.UNSUPPORTED);
}
/**
* 获取Source的字符串名字
*
* @return name
*/
default String getName() {
if (this instanceof Enum) {
return String.valueOf(this);
}
return this.getClass().getSimpleName();
}
/**
* 平台对应的 AuthRequest 实现类,必须继承自 {@link AuthDefaultRequest}
*
* @return class
*/
Class<? extends AuthDefaultRequest> getTargetClass();
}
================================================
FILE: src/main/java/me/zhyd/oauth/config/JustAuthLogConfig.java
================================================
package me.zhyd.oauth.config;
import me.zhyd.oauth.log.Log;
/**
* JustAuth 日志配置类
*
* @author HeJin
*/
public class JustAuthLogConfig {
/**
* 设置日志级别
*
* @param level 日志级别
*/
public static void setLevel(Log.Level level) {
Log.Config.level = level;
}
/**
* 关闭日志
*/
public static void disable() {
Log.Config.enable = false;
}
/**
* 开启日志
*/
public static void enable() {
Log.Config.enable = true;
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/config/package-info.java
================================================
/**
* JustAuth 核心配置相关,包括{@code AuthConfig}和{@code AuthSource}
*/
package me.zhyd.oauth.config;
================================================
FILE: src/main/java/me/zhyd/oauth/enums/AuthResponseStatus.java
================================================
package me.zhyd.oauth.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* JustAuth通用的状态码对照表
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.8
*/
@Getter
@AllArgsConstructor
public enum AuthResponseStatus {
/**
* 2000:正常;
* other:调用异常,具体异常内容见{@code msg}
*/
SUCCESS(2000, "Success"),
FAILURE(5000, "Failure"),
NOT_IMPLEMENTED(5001, "Not Implemented"),
PARAMETER_INCOMPLETE(5002, "Parameter incomplete"),
UNSUPPORTED(5003, "Unsupported operation"),
NO_AUTH_SOURCE(5004, "AuthDefaultSource cannot be null"),
UNIDENTIFIED_PLATFORM(5005, "Unidentified platform"),
ILLEGAL_REDIRECT_URI(5006, "Illegal redirect uri"),
ILLEGAL_REQUEST(5007, "Illegal request"),
ILLEGAL_CODE(5008, "Illegal code"),
ILLEGAL_STATUS(5009, "Illegal state"),
REQUIRED_REFRESH_TOKEN(5010, "The refresh token is required; it must not be null"),
ILLEGAL_TOKEN(5011, "Invalid token"),
ILLEGAL_KID(5012, "Invalid key identifier(kid)"),
ILLEGAL_TEAM_ID(5013, "Invalid team id"),
ILLEGAL_CLIENT_ID(5014, "Invalid client id"),
ILLEGAL_CLIENT_SECRET(5015, "Invalid client secret"),
ILLEGAL_WECHAT_AGENT_ID(5016, "Illegal wechat agent id"),
;
private final int code;
private final String msg;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/AuthToutiaoErrorCode.java
================================================
package me.zhyd.oauth.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 今日头条授权登录时的异常状态码
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.8
*/
@Getter
@AllArgsConstructor
public enum AuthToutiaoErrorCode {
/**
* 0:正常;
* other:调用异常,具体异常内容见{@code desc}
*/
EC0(0, "接口调用成功"),
EC1(1, "API配置错误,未传入Client Key"),
EC2(2, "API配置错误,Client Key错误,请检查是否和开放平台的ClientKey一致"),
EC3(3, "没有授权信息"),
EC4(4, "响应类型错误"),
EC5(5, "授权类型错误"),
EC6(6, "client_secret错误"),
EC7(7, "authorize_code过期"),
EC8(8, "指定url的scheme不是https"),
EC9(9, "接口内部错误,请联系头条技术"),
EC10(10, "access_token过期"),
EC11(11, "缺少access_token"),
EC12(12, "参数缺失"),
EC13(13, "url错误"),
EC21(21, "域名与登记域名不匹配"),
EC999(999, "未知错误,请联系头条技术"),
;
private int code;
private String desc;
public static AuthToutiaoErrorCode getErrorCode(int errorCode) {
AuthToutiaoErrorCode[] errorCodes = AuthToutiaoErrorCode.values();
for (AuthToutiaoErrorCode code : errorCodes) {
if (code.getCode() == errorCode) {
return code;
}
}
return EC999;
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/AuthUserGender.java
================================================
package me.zhyd.oauth.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import me.zhyd.oauth.utils.StringUtils;
import java.util.Arrays;
/**
* 用户性别
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.8
*/
@Getter
@AllArgsConstructor
public enum AuthUserGender {
/**
* MALE/FAMALE为正常值,通过{@link AuthUserGender#getRealGender(String)}方法获取真实的性别
* UNKNOWN为容错值,部分平台不会返回用户性别,为了方便统一,使用UNKNOWN标记所有未知或不可测的用户性别信息
*/
MALE("1", "男"),
FEMALE("0", "女"),
UNKNOWN("-1", "未知");
private String code;
private String desc;
/**
* 获取用户的实际性别,常规网站
*
* @param originalGender 用户第三方标注的原始性别
* @return 用户性别
*/
public static AuthUserGender getRealGender(String originalGender) {
if (null == originalGender || UNKNOWN.getCode().equals(originalGender)) {
return UNKNOWN;
}
String[] males = {"m", "男", "1", "male"};
if (Arrays.asList(males).contains(originalGender.toLowerCase())) {
return MALE;
}
return FEMALE;
}
/**
* 获取微信平台用户的实际性别,0表示未定义,1表示男性,2表示女性
*
* @param originalGender 用户第三方标注的原始性别
* @return 用户性别
* @since 1.13.2
*/
public static AuthUserGender getWechatRealGender(String originalGender) {
if (StringUtils.isEmpty(originalGender) || "0".equals(originalGender)) {
return AuthUserGender.UNKNOWN;
}
return getRealGender(originalGender);
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/package-info.java
================================================
/**
* 提供一些必要的枚举类
*/
package me.zhyd.oauth.enums;
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthAmazonScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Amazon平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.16.0
*/
@Getter
@AllArgsConstructor
public enum AuthAmazonScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
R_LITEPROFILE("profile", "The profile scope includes a user's name and email address", true),
R_EMAILADDRESS("profile:user_id", "The profile:user_id scope only includes the user_id field of the profile", true),
W_MEMBER_SOCIAL("postal_code", "This includes the user's zip/postal code number from their primary shipping address", true);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthAppleScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @see <a href="https://developer.apple.com/documentation/sign_in_with_apple/clientconfigi/3230955-scope/">scope</a>
*/
@Getter
@AllArgsConstructor
public enum AuthAppleScope implements AuthScope {
EMAIL("email", "用户邮箱", true),
NAME("name", "用户名", true),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthBaiduScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 百度平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthBaiduScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
BASIC("basic", "用户基本权限,可以获取用户的基本信息 。", true),
SUPER_MSG("super_msg", "往用户的百度首页上发送消息提醒,相关API任何应用都能使用,但要想将消息提醒在百度首页显示,需要第三方在注册应用时额外填写相关信息。", false),
NETDISK("netdisk", "获取用户在个人云存储中存放的数据。", false),
PUBLIC("public", "可以访问公共的开放API。", false),
HAO123("hao123", "可以访问Hao123 提供的开放API接口。该权限需要申请开通,请将具体的理由和用途发邮件给tuangou@baidu.com。", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthCodingScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Coding平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthCodingScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
USER("user", "读取用户的基本信息", false),
USER_EMAIL("user:email", "读取用户的邮件", false),
USER_PHONE("user:phone", "读取用户的手机号", false),
PROJECT("project", "授权项目信息、项目列表,仓库信息,公钥列表、成员", false),
PROJECT_DEPOT("project:depot", "完整的仓库控制权限", false),
PROJECT_WIKI("project:wiki", "授权读取与操作 wiki", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthDingTalkScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 钉钉平台 OAuth 授权范围
*
* https://open.dingtalk.com/document/orgapp/obtain-identity-credentials#title-4up-u8w-5ug
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.16.7
*/
@Getter
@AllArgsConstructor
public enum AuthDingTalkScope implements AuthScope {
/**
* 无需申请 默认开启
*/
openid("openid", "授权后可获得用户userid", true),
/**
* 无需申请 默认开启
*/
corpid("corpid", "授权后可获得登录过程中用户选择的组织id", false)
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthDouyinScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 抖音平台 OAuth 授权范围
*
* https://open.douyin.com/platform/doc/6855240178122983437
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.16.1
*/
@Getter
@AllArgsConstructor
public enum AuthDouyinScope implements AuthScope {
/**
* 无需申请 默认开启
*/
USER_INFO("user_info", "返回抖音用户公开信息", true),
/**
* 无需申请 默认开启
*/
AWEME_SHARE("aweme.share", "抖音分享", false),
/**
* 普通权限,管理中心申请
*/
IM_SHARE("im.share", "分享给抖音好友", false),
RENEW_REFRESH_TOKEN("renew_refresh_token", "授权有效期动态续期", false),
FOLLOWING_LIST("following.list", "获取该用户的关注列表", false),
FANS_LIST("fans.list", "获取该用户的粉丝列表", false),
VIDEO_CREATE("video.create", "视频发布及管理", false),
VIDEO_DELETE("video.delete", "删除内容", false),
VIDEO_DATA("video.data", "查询授权用户的抖音视频数据", false),
VIDEO_LIST("video.list", "查询特定抖音视频的视频数据", false),
/**
* 特殊权限 默认关闭 管理中心申请
*/
SHARE_WITH_SOURCE("share_with_source", "分享携带来源标签,用户可点击标签进入转化页", false),
MOBILE("mobile", "用抖音帐号登录第三方平台,获得用户在抖音上的手机号码", false),
MOBILE_ALERT("mobile_alert", "用抖音帐号登录第三方平台,获得用户在抖音上的手机号码", false),
VIDEO_SEARCH("video.search", "关键词视频管理", false),
POI_SEARCH("poi.search", "查询POI信息", false),
LOGIN_ID("login_id", "静默授权直接获取该用户的open id", false),
/**
* 抖音数据权限, 默认关闭, 管理中心申请
*/
DATA_EXTERNAL_USER("data.external.user", "查询用户的获赞、评论、分享,主页访问等相关数据", false),
DATA_EXTERNAL_ITEM("data.external.item", "查询作品的获赞,评论,分享等相关数据", false),
FANS_DATA("fans.data", "获取用户粉丝画像数据", false),
HOTSEARCH("hotsearch", "获取抖音热门内容", false),
STAR_TOP_SCORE_DISPLAY("star_top_score_display", "星图达人与达人对应各指数评估分,以及星图6大热门维度下的达人榜单", false),
STAR_TOPS("star_tops", "星图达人与达人对应各指数评估分,以及星图6大热门维度下的达人榜单", false),
STAR_AUTHOR_SCORE_DISPLAY("star_author_score_display", "星图达人与达人对应各指数评估分,以及星图6大热门维度下的达人榜单", false),
notes("data.external.sdk_share", "获取用户通过分享SDK分享视频数据", false),
/**
* 定向开通 默认关闭 定向开通
*/
DISCOVERY_ENT("discovery.ent", "查询抖音电影榜、抖音剧集榜、抖音综艺榜数据", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthFacebookScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Facebook 平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthFacebookScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
PUBLIC_PROFILE("public_profile", "权限允许应用读取用户默认的公开资料", true),
EMAIL("email", "获取用户的邮箱", false),
USER_AGE_RANGE("user_age_range", "允许应用程序访问用户的年龄范围", false),
USER_BIRTHDAY("user_birthday", "获取用户的生日", false),
USER_FRIENDS("user_friends", "获取用户的好友列表", false),
USER_GENDER("user_gender", "获取用户的性别", false),
USER_HOMETOWN("user_hometown", "获取用户的家乡信息", false),
USER_LIKES("user_likes", "获取用户的喜欢列表", false),
USER_LINK("user_link", "获取用户的个人链接", true),
USER_LOCATION("user_location", "获取用户的位置信息", false),
USER_PHOTOS("user_photos", "获取用户的相册信息", false),
USER_POSTS("user_posts", "获取用户发布的内容", false),
USER_VIDEOS("user_videos", "获取用户上传的视频信息", false),
GROUPS_ACCESS_MEMBER_INFO("groups_access_member_info", "获取公开的群组成员信息", false),
PUBLISH_TO_GROUPS("publish_to_groups", "授权您的应用程序代表某人将内容发布到组中,前提是他们已经授予您的应用程序访问权限", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthFigmaScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Figma OAuth 授权范围
* <a href="https://www.figma.com/developers/api#authentication-scopes">...</a>
*
* @author xiangqian
* @since 1.16.6
*/
@Getter
@AllArgsConstructor
public enum AuthFigmaScope implements AuthScope {
FILE_CONTENT("files:read", "Read files, projects, users, versions, comments, components & styles, and webhooks", true),
VARIABLES("file_variables:read,file_variables:write", "Read and write to variables in Figma file. Note: this is only available to members in Enterprise organizations", false),
COMMENTS("file_comments:write", "Post and delete comments and comment reactions in files", false),
DEV_RESOURCES("file_dev_resources:read,file_dev_resources:write", "Read and write to dev resources in files", false),
LIBRARY_ANALYTICS("library_analytics:read", "Read your design system analytics", false),
WEBHOOKS("webhooks:write", "Create and manage webhooks", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGiteeScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Gitee 平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthGiteeScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
USER_INFO("user_info", "访问用户的个人信息、最新动态等", true),
PROJECTS("projects", "查看、创建、更新用户的项目", false),
PULL_REQUESTS("pull_requests", "查看、发布、更新用户的 Pull Request", false),
ISSUES("issues", "查看、发布、更新用户的 Issue", false),
NOTES("notes", "查看、发布、管理用户在项目、代码片段中的评论", false),
KEYS("keys", "查看、部署、删除用户的公钥", false),
HOOK("hook", "查看、部署、更新用户的 Webhook", false),
GROUPS("groups", "查看、管理用户的组织以及成员", false),
GISTS("gists", "查看、删除、更新用户的代码片段", false),
ENTERPRISES("enterprises", "查看、管理用户的企业以及成员", false),
EMAILS("emails", "查看用户的个人邮箱信息", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGithubScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Github平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthGithubScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
REPO_STATUS("repo:status", "Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses <em>without</em> granting access to the code.", false),
REPO_DEPLOYMENT("repo_deployment", "Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, <em>without</em> granting access to the code.", false),
PUBLIC_REPO("public_repo", "Limits access to public repositories. That includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories.", false),
REPO_INVITE("repo:invite", "Grants accept/decline abilities for invitations to collaborate on a repository. This scope is only necessary to grant other users or services access to invites <em>without</em> granting access to the code.", false),
SECURITY_EVENTS("security_events", "Grants read and write access to security events in the code scanning API.", false),
WRITE_REPO_HOOK("write:repo_hook", "Grants read, write, and ping access to hooks in public or private repositories.", false),
READ_REPO_HOOK("read:repo_hook", "Grants read and ping access to hooks in public or private repositories.", false),
ADMIN_ORG("admin:org", "Fully manage the organization and its teams, projects, and memberships.", false),
WRITE_ORG("write:org", "Read and write access to organization membership, organization projects, and team membership.", false),
READ_ORG("read:org", "Read-only access to organization membership, organization projects, and team membership.", false),
ADMIN_PUBLIC_KEY("admin:public_key", "Fully manage public keys.", false),
WRITE_PUBLIC_KEY("write:public_key", "Create, list, and view details for public keys.", false),
READ_PUBLIC_KEY("read:public_key", "List and view details for public keys.", false),
GIST("gist", "Grants write access to gists.", false),
NOTIFICATIONS("notifications", "Grants: <br>* read access to a user's notifications <br>* mark as read access to threads <br>* watch and unwatch access to a repository, and <br>* read, write, and delete access to thread subscriptions.", false),
USER("user", "Grants read/write access to profile info only. Note that this scope includes <code>user:email</code> and <code>user:follow</code>.", false),
READ_USER("read:user", "Grants access to read a user's profile data.", false),
USER_EMAIL("user:email", "Grants read access to a user's email addresses.", false),
USER_FOLLOW("user:follow", "Grants access to follow or unfollow other users.", false),
DELETE_REPO("delete_repo", "Grants access to delete adminable repositories.", false),
WRITE_DISCUSSION("write:discussion", "Allows read and write access for team discussions.", false),
READ_DISCUSSION("read:discussion", "Allows read access for team discussions.", false),
WRITE_PACKAGES("write:packages", "Grants access to upload or publish a package in GitHub Packages. For more information, see \"<a href=\"https://help.github.com/github/managing-packages-with-github-packages/publishing-a-package\">Publishing a package</a>\" in the GitHub Help documentation.", false),
READ_PACKAGES("read:packages", "Grants access to download or install packages from GitHub Packages. For more information, see \"<a href=\"https://help.github.com/github/managing-packages-with-github-packages/installing-a-package\">Installing a package</a>\" in the GitHub Help documentation.", false),
DELETE_PACKAGES("delete:packages", "Grants access to delete packages from GitHub Packages. For more information, see \"<a href=\"https://help.github.com/github/managing-packages-with-github-packages/deleting-a-package\">Deleting packages</a>\" in the GitHub Help documentation.", false),
ADMIN_GPG_KEY("admin:gpg_key", "Fully manage GPG keys.", false),
WRITE_GPG_KEY("write:gpg_key", "Create, list, and view details for GPG keys.", false),
READ_GPG_KEY("read:gpg_key", "List and view details for GPG keys.", false),
WORKFLOW("workflow", "Grants the ability to add and update GitHub Actions workflow files. Workflow files can be committed without this scope if the same file (with both the same path and contents) exists on another branch in the same repository.", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGitlabScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Gitlab 平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthGitlabScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
READ_USER("read_user", "Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.", true),
OPENID("openid", "Grants permission to authenticate with GitLab using OpenID Connect. Also gives read-only access to the user's profile and group memberships.", true),
PROFILE("profile", "Grants read-only access to the user's profile data using OpenID Connect.", true),
EMAIL("email", "Grants read-only access to the user's primary email address using OpenID Connect.", true),
READ_API("read_api", "Grants read access to the API, including all groups and projects, the container registry, and the package registry.", false),
READ_REPOSITORY("read_repository", "Grants read-only access to repositories on private projects using Git-over-HTTP or the Repository Files API.", false),
WRITE_REPOSITORY("write_repository", "Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API).", false),
READ_REGISTRY("read_registry", "Grants read-only access to container registry images on private projects.", false),
WRITE_REGISTRY("write_registry", "<span title=\"translation missing: en.doorkeeper.scope_desc.write_registry\">Write Registry</span>", false),
SUDO("sudo", "Grants permission to perform API actions as any user in the system, when authenticated as an admin user.", false),
API("api", "Grants complete read/write access to the API, including all groups and projects, the container registry, and the package registry.", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGoogleScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* Google 平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthGoogleScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
USER_OPENID("openid", "Associate you with your personal info on Google", true),
USER_EMAIL("email", "View your email address", true),
USER_PROFILE("profile", "View your basic profile info", true),
USER_PHONENUMBERS_READ("https://www.googleapis.com/auth/user.phonenumbers.read", "View your phone numbers", false),
USER_ORGANIZATION_READ("https://www.googleapis.com/auth/user.organization.read", "See your education, work history and org info", false),
USER_GENDER_READ("https://www.googleapis.com/auth/user.gender.read", "See your gender", false),
USER_EMAILS_READ("https://www.googleapis.com/auth/user.emails.read", "View your email addresses", false),
USER_BIRTHDAY_READ("https://www.googleapis.com/auth/user.birthday.read", "View your complete date of birth", false),
USER_ADDRESSES_READ("https://www.googleapis.com/auth/user.addresses.read", "View your street addresses", false),
USERINFO_PROFILE("https://www.googleapis.com/auth/userinfo.profile", "See your personal info, including any personal info you've made publicly available", false),
USERINFO_EMAIL("https://www.googleapis.com/auth/userinfo.email", "View your email address", false),
YT_ANALYTICS_READONLY("https://www.googleapis.com/auth/yt-analytics.readonly", "View YouTube Analytics reports for your YouTube content", false),
YT_ANALYTICS_MONETARY_READONLY("https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "View monetary and non-monetary YouTube Analytics reports for your YouTube content", false),
YOUTUBEPARTNER_CHANNEL_AUDIT("https://www.googleapis.com/auth/youtubepartner-channel-audit", "View private information of your YouTube channel relevant during the audit process with a YouTube partner", false),
YOUTUBEPARTNER("https://www.googleapis.com/auth/youtubepartner", "View and manage your assets and associated content on YouTube", false),
YOUTUBE_UPLOAD("https://www.googleapis.com/auth/youtube.upload", "Manage your YouTube videos", false),
YOUTUBE_READONLY("https://www.googleapis.com/auth/youtube.readonly", "View your YouTube account", false),
YOUTUBE_FORCE_SSL("https://www.googleapis.com/auth/youtube.force-ssl", "See, edit, and permanently delete your YouTube videos, ratings, comments and captions", false),
YOUTUBE_CHANNEL_MEMBERSHIPS_CREATOR("https://www.googleapis.com/auth/youtube.channel-memberships.creator", "See a list of your current active channel members, their current level, and when they became a member", false),
YOUTUBE("https://www.googleapis.com/auth/youtube", "Manage your YouTube account", false),
WEBMASTERS_READONLY("https://www.googleapis.com/auth/webmasters.readonly", "View Search Console data for your verified sites", false),
WEBMASTERS("https://www.googleapis.com/auth/webmasters", "View and manage Search Console data for your verified sites", false),
VERIFIEDACCESS("https://www.googleapis.com/auth/verifiedaccess", "Verify your enterprise credentials", false),
TRACE_APPEND("https://www.googleapis.com/auth/trace.append", "Write Trace data for a project or application", false),
TASKS_READONLY("https://www.googleapis.com/auth/tasks.readonly", "View your tasks", false),
TASKS("https://www.googleapis.com/auth/tasks", "Create, edit, organize, and delete all your tasks", false),
TAGMANAGER_READONLY("https://www.googleapis.com/auth/tagmanager.readonly", "View your Google Tag Manager container and its subcomponents", false),
TAGMANAGER_PUBLISH("https://www.googleapis.com/auth/tagmanager.publish", "Publish your Google Tag Manager container versions", false),
TAGMANAGER_MANAGE_USERS("https://www.googleapis.com/auth/tagmanager.manage.users", "Manage user permissions of your Google Tag Manager account and container", false),
TAGMANAGER_MANAGE_ACCOUNTS("https://www.googleapis.com/auth/tagmanager.manage.accounts", "View and manage your Google Tag Manager accounts", false),
TAGMANAGER_EDIT_CONTAINERVERSIONS("https://www.googleapis.com/auth/tagmanager.edit.containerversions", "Manage your Google Tag Manager container versions", false),
TAGMANAGER_EDIT_CONTAINERS("https://www.googleapis.com/auth/tagmanager.edit.containers", "Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing", false),
TAGMANAGER_DELETE_CONTAINERS("https://www.googleapis.com/auth/tagmanager.delete.containers", "Delete your Google Tag Manager containers", false),
STREETVIEWPUBLISH("https://www.googleapis.com/auth/streetviewpublish", "Publish and manage your 360 photos on Google Street View", false),
SQLSERVICE_ADMIN("https://www.googleapis.com/auth/sqlservice.admin", "Manage your Google SQL Service instances", false),
SPREADSHEETS_READONLY("https://www.googleapis.com/auth/spreadsheets.readonly", "View your Google Spreadsheets", false),
SPREADSHEETS("https://www.googleapis.com/auth/spreadsheets", "See, edit, create, and delete your spreadsheets in Google Drive", false),
SPANNER_DATA("https://www.googleapis.com/auth/spanner.data", "View and manage the contents of your Spanner databases", false),
SPANNER_ADMIN("https://www.googleapis.com/auth/spanner.admin", "Administer your Spanner databases", false),
SOURCE_READ_WRITE("https://www.googleapis.com/auth/source.read_write", "Manage the contents of your source code repositories", false),
SOURCE_READ_ONLY("https://www.googleapis.com/auth/source.read_only", "View the contents of your source code repositories", false),
SOURCE_FULL_CONTROL("https://www.googleapis.com/auth/source.full_control", "Manage your source code repositories", false),
SITEVERIFICATION_VERIFY_ONLY("https://www.googleapis.com/auth/siteverification.verify_only", "Manage your new site verifications with Google", false),
SITEVERIFICATION("https://www.googleapis.com/auth/siteverification", "Manage the list of sites and domains you control", false),
SERVICECONTROL("https://www.googleapis.com/auth/servicecontrol", "Manage your Google Service Control data", false),
SERVICE_MANAGEMENT_READONLY("https://www.googleapis.com/auth/service.management.readonly", "View your Google API service configuration", false),
SERVICE_MANAGEMENT("https://www.googleapis.com/auth/service.management", "Manage your Google API service configuration", false),
SCRIPT_PROJECTS_READONLY("https://www.googleapis.com/auth/script.projects.readonly", "View Google Apps Script projects", false),
SCRIPT_PROJECTS("https://www.googleapis.com/auth/script.projects", "Create and update Google Apps Script projects", false),
SCRIPT_PROCESSES("https://www.googleapis.com/auth/script.processes", "View Google Apps Script processes", false),
SCRIPT_METRICS("https://www.googleapis.com/auth/script.metrics", "View Google Apps Script project's metrics", false),
SCRIPT_DEPLOYMENTS_READONLY("https://www.googleapis.com/auth/script.deployments.readonly", "View Google Apps Script deployments", false),
SCRIPT_DEPLOYMENTS("https://www.googleapis.com/auth/script.deployments", "Create and update Google Apps Script deployments", false),
PUBSUB("https://www.googleapis.com/auth/pubsub", "View and manage Pub/Sub topics and subscriptions", false),
PRESENTATIONS_READONLY("https://www.googleapis.com/auth/presentations.readonly", "View your Google Slides presentations", false),
PRESENTATIONS("https://www.googleapis.com/auth/presentations", "View and manage your Google Slides presentations", false),
PHOTOSLIBRARY_SHARING("https://www.googleapis.com/auth/photoslibrary.sharing", "Manage and add to shared albums on your behalf", false),
PHOTOSLIBRARY_READONLY_APPCREATEDDATA("https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata", "Manage photos added by this app", false),
PHOTOSLIBRARY_READONLY("https://www.googleapis.com/auth/photoslibrary.readonly", "View your Google Photos library", false),
PHOTOSLIBRARY_APPENDONLY("https://www.googleapis.com/auth/photoslibrary.appendonly", "Add to your Google Photos library", false),
PHOTOSLIBRARY("https://www.googleapis.com/auth/photoslibrary", "View and manage your Google Photos library", false),
NDEV_CLOUDMAN_READONLY("https://www.googleapis.com/auth/ndev.cloudman.readonly", "View your Google Cloud Platform management resources and deployment status information", false),
NDEV_CLOUDMAN("https://www.googleapis.com/auth/ndev.cloudman", "View and manage your Google Cloud Platform management resources and deployment status information", false),
NDEV_CLOUDDNS_READWRITE("https://www.googleapis.com/auth/ndev.clouddns.readwrite", "View and manage your DNS records hosted by Google Cloud DNS", false),
NDEV_CLOUDDNS_READONLY("https://www.googleapis.com/auth/ndev.clouddns.readonly", "View your DNS records hosted by Google Cloud DNS", false),
MONITORING_WRITE("https://www.googleapis.com/auth/monitoring.write", "Publish metric data to your Google Cloud projects", false),
MONITORING_READ("https://www.googleapis.com/auth/monitoring.read", "View monitoring data for all of your Google Cloud and third-party projects", false),
MONITORING("https://www.googleapis.com/auth/monitoring", "View and write monitoring data for all of your Google and third-party Cloud and API projects", false),
MANUFACTURERCENTER("https://www.googleapis.com/auth/manufacturercenter", "Manage your product listings for Google Manufacturer Center", false),
LOGGING_WRITE("https://www.googleapis.com/auth/logging.write", "Submit log data for your projects", false),
LOGGING_READ("https://www.googleapis.com/auth/logging.read", "View log data for your projects", false),
LOGGING_ADMIN("https://www.googleapis.com/auth/logging.admin", "Administrate log data for your projects", false),
JOBS("https://www.googleapis.com/auth/jobs", "Manage job postings", false),
INDEXING("https://www.googleapis.com/auth/indexing", "Submit data to Google for indexing", false),
GROUPS("https://www.googleapis.com/auth/groups", "View and manage your Google Groups", false),
GMAIL("https://mail.google.com/", "Read, compose, send, and permanently delete all your email from Gmail", false),
GMAIL_SETTINGS_SHARING("https://www.googleapis.com/auth/gmail.settings.sharing", "Manage your sensitive mail settings, including who can manage your mail", false),
GMAIL_SETTINGS_BASIC("https://www.googleapis.com/auth/gmail.settings.basic", "Manage your basic mail settings", false),
GMAIL_SEND("https://www.googleapis.com/auth/gmail.send", "Send email on your behalf", false),
GMAIL_READONLY("https://www.googleapis.com/auth/gmail.readonly", "View your email messages and settings", false),
GMAIL_MODIFY("https://www.googleapis.com/auth/gmail.modify", "View and modify but not delete your email", false),
GMAIL_METADATA("https://www.googleapis.com/auth/gmail.metadata", "View your email message metadata such as labels and headers, but not the email body", false),
GMAIL_LABELS("https://www.googleapis.com/auth/gmail.labels", "Manage mailbox labels", false),
GMAIL_INSERT("https://www.googleapis.com/auth/gmail.insert", "Insert mail into your mailbox", false),
GMAIL_COMPOSE("https://www.googleapis.com/auth/gmail.compose", "Manage drafts and send emails", false),
GMAIL_ADDONS_CURRENT_MESSAGE_READONLY("https://www.googleapis.com/auth/gmail.addons.current.message.readonly", "View your email messages when the add-on is running", false),
GMAIL_ADDONS_CURRENT_MESSAGE_METADATA("https://www.googleapis.com/auth/gmail.addons.current.message.metadata", "View your email message metadata when the add-on is running", false),
GMAIL_ADDONS_CURRENT_MESSAGE_ACTION("https://www.googleapis.com/auth/gmail.addons.current.message.action", "View your email messages when you interact with the add-on", false),
GMAIL_ADDONS_CURRENT_ACTION_COMPOSE("https://www.googleapis.com/auth/gmail.addons.current.action.compose", "Manage drafts and send emails when you interact with the add-on", false),
GENOMICS("https://www.googleapis.com/auth/genomics", "View and manage Genomics data", false),
GAMES("https://www.googleapis.com/auth/games", "Create, edit, and delete your Google Play Games activity", false),
FORMS_CURRENTONLY("https://www.googleapis.com/auth/forms.currentonly", "View and manage forms that this application has been installed in", false),
FORMS("https://www.googleapis.com/auth/forms", "View and manage your forms in Google Drive", false),
FITNESS_REPRODUCTIVE_HEALTH_WRITE("https://www.googleapis.com/auth/fitness.reproductive_health.write", "See and add info about your reproductive health in Google Fit. I consent to Google sharing my reporductive health information with this app.", false),
FITNESS_REPRODUCTIVE_HEALTH_READ("https://www.googleapis.com/auth/fitness.reproductive_health.read", "See info about your reproductive health in Google Fit. I consent to Google sharing my reporductive health information with this app.", false),
FITNESS_OXYGEN_SATURATION_WRITE("https://www.googleapis.com/auth/fitness.oxygen_saturation.write", "See and add info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app.", false),
FITNESS_OXYGEN_SATURATION_READ("https://www.googleapis.com/auth/fitness.oxygen_saturation.read", "See info about your oxygen saturation in Google Fit. I consent to Google sharing my oxygen saturation information with this app.", false),
FITNESS_NUTRITION_WRITE("https://www.googleapis.com/auth/fitness.nutrition.write", "See and add to info about your nutrition in Google Fit", false),
FITNESS_NUTRITION_READ("https://www.googleapis.com/auth/fitness.nutrition.read", "See info about your nutrition in Google Fit", false),
FITNESS_LOCATION_WRITE("https://www.googleapis.com/auth/fitness.location.write", "See and add to your Google Fit location data", false),
FITNESS_LOCATION_READ("https://www.googleapis.com/auth/fitness.location.read", "See your Google Fit speed and distance data", false),
FITNESS_BODY_TEMPERATURE_WRITE("https://www.googleapis.com/auth/fitness.body_temperature.write", "See and add to info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app.", false),
FITNESS_BODY_TEMPERATURE_READ("https://www.googleapis.com/auth/fitness.body_temperature.read", "See info about your body temperature in Google Fit. I consent to Google sharing my body temperature information with this app.", false),
FITNESS_BODY_WRITE("https://www.googleapis.com/auth/fitness.body.write", "See and add info about your body measurements and heart rate to Google Fit", false),
FITNESS_BODY_READ("https://www.googleapis.com/auth/fitness.body.read", "See info about your body measurements and heart rate in Google Fit", false),
FITNESS_BLOOD_PRESSURE_WRITE("https://www.googleapis.com/auth/fitness.blood_pressure.write", "See and add info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app.", false),
FITNESS_BLOOD_PRESSURE_READ("https://www.googleapis.com/auth/fitness.blood_pressure.read", "See info about your blood pressure in Google Fit. I consent to Google sharing my blood pressure information with this app.", false),
FITNESS_BLOOD_GLUCOSE_WRITE("https://www.googleapis.com/auth/fitness.blood_glucose.write", "See and add info about your blood glucose to Google Fit. I consent to Google sharing my blood glucose information with this app.", false),
FITNESS_BLOOD_GLUCOSE_READ("https://www.googleapis.com/auth/fitness.blood_glucose.read", "See info about your blood glucose in Google Fit. I consent to Google sharing my blood glucose information with this app.", false),
FITNESS_ACTIVITY_WRITE("https://www.googleapis.com/auth/fitness.activity.write", "See and add to your Google Fit physical activity data", false),
FITNESS_ACTIVITY_READ("https://www.googleapis.com/auth/fitness.activity.read", "Use Google Fit to see and store your physical activity data", false),
FIREBASE_READONLY("https://www.googleapis.com/auth/firebase.readonly", "View all your Firebase data and settings", false),
FIREBASE("https://www.googleapis.com/auth/firebase", "View and administer all your Firebase data and settings", false),
EDISCOVERY_READONLY("https://www.googleapis.com/auth/ediscovery.readonly", "View your eDiscovery data", false),
EDISCOVERY("https://www.googleapis.com/auth/ediscovery", "Manage your eDiscovery data", false),
DRIVE_SCRIPTS("https://www.googleapis.com/auth/drive.scripts", "Modify your Google Apps Script scripts' behavior", false),
DRIVE_READONLY("https://www.googleapis.com/auth/drive.readonly", "See and download all your Google Drive files", false),
DRIVE_PHOTOS_READONLY("https://www.googleapis.com/auth/drive.photos.readonly", "View the photos, videos and albums in your Google Photos", false),
DRIVE_METADATA_READONLY("https://www.googleapis.com/auth/drive.metadata.readonly", "View metadata for files in your Google Drive", false),
DRIVE_METADATA("https://www.googleapis.com/auth/drive.metadata", "View and manage metadata of files in your Google Drive", false),
DRIVE_FILE("https://www.googleapis.com/auth/drive.file", "View and manage Google Drive files and folders that you have opened or created with this app", false),
DRIVE_APPDATA("https://www.googleapis.com/auth/drive.appdata", "View and manage its own configuration data in your Google Drive", false),
DRIVE_ACTIVITY_READONLY("https://www.googleapis.com/auth/drive.activity.readonly", "View the activity record of files in your Google Drive", false),
DRIVE_ACTIVITY("https://www.googleapis.com/auth/drive.activity", "View and add to the activity record of files in your Google Drive", false),
DRIVE("https://www.googleapis.com/auth/drive", "See, edit, create, and delete all of your Google Drive files", false),
ACTIVITY("https://www.googleapis.com/auth/activity", "View the activity history of your Google apps", false),
DOUBLECLICKSEARCH("https://www.googleapis.com/auth/doubleclicksearch", "View and manage your advertising data in DoubleClick Search", false),
DOUBLECLICKBIDMANAGER("https://www.googleapis.com/auth/doubleclickbidmanager", "View and manage your reports in DoubleClick Bid Manager", false),
DOCUMENTS_READONLY("https://www.googleapis.com/auth/documents.readonly", "View your Google Docs documents", false),
DOCUMENTS("https://www.googleapis.com/auth/documents", "View and manage your Google Docs documents", false),
DISPLAY_VIDEO("https://www.googleapis.com/auth/display-video", "Create, see, edit, and permanently delete your Display & Video 360 entities and reports", false),
DIRECTORY_READONLY("https://www.googleapis.com/auth/directory.readonly", "See and download your organization's GSuite directory", false),
DIALOGFLOW("https://www.googleapis.com/auth/dialogflow", "View, manage and query your Dialogflow agents", false),
DFATRAFFICKING("https://www.googleapis.com/auth/dfatrafficking", "View and manage your DoubleClick Campaign Manager's (DCM) display ad campaigns", false),
DFAREPORTING("https://www.googleapis.com/auth/dfareporting", "View and manage DoubleClick for Advertisers reports", false),
DEVSTORAGE_READ_WRITE("https://www.googleapis.com/auth/devstorage.read_write", "Manage your data in Google Cloud Storage", false),
DEVSTORAGE_READ_ONLY("https://www.googleapis.com/auth/devstorage.read_only", "View your data in Google Cloud Storage", false),
DEVSTORAGE_FULL_CONTROL("https://www.googleapis.com/auth/devstorage.full_control", "Manage your data and permissions in Google Cloud Storage", false),
DDMCONVERSIONS("https://www.googleapis.com/auth/ddmconversions", "Manage DoubleClick Digital Marketing conversions", false),
DATASTORE("https://www.googleapis.com/auth/datastore", "View and manage your Google Cloud Datastore data", false),
CONTENT("https://www.googleapis.com/auth/content", "Manage your product listings and accounts for Google Shopping", false),
CONTACTS_READONLY("https://www.googleapis.com/auth/contacts.readonly", "See and download your contacts", false),
CONTACTS_OTHER_READONLY("https://www.googleapis.com/auth/contacts.other.readonly", "See and download contact info automatically saved in your \"Other contacts\"", false),
CONTACTS("https://www.googleapis.com/auth/contacts", "See, edit, download, and permanently delete your contacts", false),
CONTACTS_FEEDS("https://www.google.com/m8/feeds", "See, edit, download, and permanently delete your contacts", false),
COMPUTE_READONLY("https://www.googleapis.com/auth/compute.readonly", "View your Google Compute Engine resources", false),
COMPUTE("https://www.googleapis.com/auth/compute", "View and manage your Google Compute Engine resources", false),
CLOUDRUNTIMECONFIG("https://www.googleapis.com/auth/cloudruntimeconfig", "Manage your Google Cloud Platform services' runtime configuration", false),
CLOUDKMS("https://www.googleapis.com/auth/cloudkms", "View and manage your keys and secrets stored in Cloud Key Management Service", false),
CLOUDIOT("https://www.googleapis.com/auth/cloudiot", "Register and manage devices in the Google Cloud IoT service", false),
CLOUD_SEARCH_STATS_INDEXING("https://www.googleapis.com/auth/cloud_search.stats.indexing", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_STATS("https://www.googleapis.com/auth/cloud_search.stats", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_SETTINGS_QUERY("https://www.googleapis.com/auth/cloud_search.settings.query", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_SETTINGS_INDEXING("https://www.googleapis.com/auth/cloud_search.settings.indexing", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_SETTINGS("https://www.googleapis.com/auth/cloud_search.settings", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_QUERY("https://www.googleapis.com/auth/cloud_search.query", "Search your organization's data in the Cloud Search index", false),
CLOUD_SEARCH_INDEXING("https://www.googleapis.com/auth/cloud_search.indexing", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH_DEBUG("https://www.googleapis.com/auth/cloud_search.debug", "Index and serve your organization's data with Cloud Search", false),
CLOUD_SEARCH("https://www.googleapis.com/auth/cloud_search", "Index and serve your organization's data with Cloud Search", false),
CLOUD_DEBUGGER("https://www.googleapis.com/auth/cloud_debugger", "Use Stackdriver Debugger", false),
CLOUD_VISION("https://www.googleapis.com/auth/cloud-vision", "Apply machine learning models to understand and label images", false),
CLOUD_TRANSLATION("https://www.googleapis.com/auth/cloud-translation", "Translate text from one language to another using Google Translate", false),
CLOUD_PLATFORM_READ_ONLY("https://www.googleapis.com/auth/cloud-platform.read-only", "View your data across Google Cloud Platform services", false),
CLOUD_PLATFORM("https://www.googleapis.com/auth/cloud-platform", "View and manage your data across Google Cloud Platform services", false),
CLOUD_LANGUAGE("https://www.googleapis.com/auth/cloud-language", "Apply machine learning models to reveal the structure and meaning of text", false),
CLOUD_IDENTITY_GROUPS_READONLY("https://www.googleapis.com/auth/cloud-identity.groups.readonly", "See any Cloud Identity Groups that you can access, including group members and their emails", false),
CLOUD_IDENTITY_GROUPS("https://www.googleapis.com/auth/cloud-identity.groups", "See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group", false),
CLOUD_BIGTABLE_ADMIN_TABLE("https://www.googleapis.com/auth/cloud-bigtable.admin.table", "Administer your Cloud Bigtable tables", false),
CLOUD_BIGTABLE_ADMIN_CLUSTER("https://www.googleapis.com/auth/cloud-bigtable.admin.cluster", "Administer your Cloud Bigtable clusters", false),
CLOUD_BIGTABLE_ADMIN("https://www.googleapis.com/auth/cloud-bigtable.admin", "Administer your Cloud Bigtable tables and clusters", false),
CLASSROOM_TOPICS_READONLY("https://www.googleapis.com/auth/classroom.topics.readonly", "View topics in Google Classroom", false),
CLASSROOM_TOPICS("https://www.googleapis.com/auth/classroom.topics", "See, create, and edit topics in Google Classroom", false),
CLASSROOM_STUDENT_SUBMISSIONS_STUDENTS_READONLY("https://www.googleapis.com/auth/classroom.student-submissions.students.readonly", "View course work and grades for students in the Google Classroom classes you teach or administer", false),
CLASSROOM_STUDENT_SUBMISSIONS_ME_READONLY("https://www.googleapis.com/auth/classroom.student-submissions.me.readonly", "View your course work and grades in Google Classroom", false),
CLASSROOM_ROSTERS_READONLY("https://www.googleapis.com/auth/classroom.rosters.readonly", "View your Google Classroom class rosters", false),
CLASSROOM_ROSTERS("https://www.googleapis.com/auth/classroom.rosters", "Manage your Google Classroom class rosters", false),
CLASSROOM_PUSH_NOTIFICATIONS("https://www.googleapis.com/auth/classroom.push-notifications", "Receive notifications about your Google Classroom data", false),
CLASSROOM_PROFILE_PHOTOS("https://www.googleapis.com/auth/classroom.profile.photos", "View the profile photos of people in your classes", false),
CLASSROOM_PROFILE_EMAILS("https://www.googleapis.com/auth/classroom.profile.emails", "View the email addresses of people in your classes", false),
CLASSROOM_GUARDIANLINKS_STUDENTS_READONLY("https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly", "View guardians for students in your Google Classroom classes", false),
CLASSROOM_GUARDIANLINKS_STUDENTS("https://www.googleapis.com/auth/classroom.guardianlinks.students", "View and manage guardians for students in your Google Classroom classes", false),
CLASSROOM_GUARDIANLINKS_ME_READONLY("https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", "View your Google Classroom guardians", false),
CLASSROOM_COURSEWORK_STUDENTS_READONLY("https://www.googleapis.com/auth/classroom.coursework.students.readonly", "View course work and grades for students in the Google Classroom classes you teach or administer", false),
CLASSROOM_COURSEWORK_STUDENTS("https://www.googleapis.com/auth/classroom.coursework.students", "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer", false),
CLASSROOM_COURSEWORK_ME_READONLY("https://www.googleapis.com/auth/classroom.coursework.me.readonly", "View your course work and grades in Google Classroom", false),
CLASSROOM_COURSEWORK_ME("https://www.googleapis.com/auth/classroom.coursework.me", "Manage your course work and view your grades in Google Classroom", false),
CLASSROOM_COURSES_READONLY("https://www.googleapis.com/auth/classroom.courses.readonly", "View your Google Classroom classes", false),
CLASSROOM_COURSES("https://www.googleapis.com/auth/classroom.courses", "Manage your Google Classroom classes", false),
CLASSROOM_ANNOUNCEMENTS_READONLY("https://www.googleapis.com/auth/classroom.announcements.readonly", "View announcements in Google Classroom", false),
CLASSROOM_ANNOUNCEMENTS("https://www.googleapis.com/auth/classroom.announcements", "View and manage announcements in Google Classroom", false),
CALENDAR_SETTINGS_READONLY("https://www.googleapis.com/auth/calendar.settings.readonly", "View your Calendar settings", false),
CALENDAR_READONLY("https://www.googleapis.com/auth/calendar.readonly", "View your calendars", false),
CALENDAR_EVENTS_READONLY("https://www.googleapis.com/auth/calendar.events.readonly", "View events on all your calendars", false),
CALENDAR_EVENTS("https://www.googleapis.com/auth/calendar.events", "View and edit events on all your calendars", false),
CALENDAR("https://www.googleapis.com/auth/calendar", "See, edit, share, and permanently delete all the calendars you can access using Google Calendar", false),
CALENDAR_FEEDS("https://www.google.com/calendar/feeds", "See, edit, share, and permanently delete all the calendars you can access using Google Calendar", false),
BOOKS("https://www.googleapis.com/auth/books", "Manage your books", false),
BLOGGER_READONLY("https://www.googleapis.com/auth/blogger.readonly", "View your Blogger account", false),
BLOGGER("https://www.googleapis.com/auth/blogger", "Manage your Blogger account", false),
BIGTABLE_ADMIN_TABLE("https://www.googleapis.com/auth/bigtable.admin.table", "Administer your Cloud Bigtable tables", false),
BIGTABLE_ADMIN_INSTANCE("https://www.googleapis.com/auth/bigtable.admin.instance", "Administer your Cloud Bigtable clusters", false),
BIGTABLE_ADMIN_CLUSTER("https://www.googleapis.com/auth/bigtable.admin.cluster", "Administer your Cloud Bigtable clusters", false),
BIGTABLE_ADMIN("https://www.googleapis.com/auth/bigtable.admin", "Administer your Cloud Bigtable tables and clusters", false),
BIGQUERY_READONLY("https://www.googleapis.com/auth/bigquery.readonly", "View your data in Google BigQuery", false),
BIGQUERY_INSERTDATA("https://www.googleapis.com/auth/bigquery.insertdata", "Insert data into Google BigQuery", false),
BIGQUERY("https://www.googleapis.com/auth/bigquery", "View and manage your data in Google BigQuery", false),
APPS_ORDER_READONLY("https://www.googleapis.com/auth/apps.order.readonly", "Manage users on your domain", false),
APPS_ORDER("https://www.googleapis.com/auth/apps.order", "Manage users on your domain", false),
APPS_LICENSING("https://www.googleapis.com/auth/apps.licensing", "View and manage G Suite licenses for your domain", false),
APPS_GROUPS_SETTINGS("https://www.googleapis.com/auth/apps.groups.settings", "View and manage the settings of a G Suite group", false),
APPS_GROUPS_MIGRATION("https://www.googleapis.com/auth/apps.groups.migration", "Manage messages in groups on your domain", false),
APPS_ALERTS("https://www.googleapis.com/auth/apps.alerts", "See and delete your domain's G Suite alerts, and send alert feedback", false),
APPENGINE_ADMIN("https://www.googleapis.com/auth/appengine.admin", "View and manage your applications deployed on Google App Engine", false),
ANDROIDPUBLISHER("https://www.googleapis.com/auth/androidpublisher", "View and manage your Google Play Developer account", false),
ANDROIDMANAGEMENT("https://www.googleapis.com/auth/androidmanagement", "Manage Android devices and apps for your customers", false),
ANDROIDENTERPRISE("https://www.googleapis.com/auth/androidenterprise", "Manage corporate Android devices", false),
ANALYTICS_USER_DELETION("https://www.googleapis.com/auth/analytics.user.deletion", "Manage Google Analytics user deletion requests", false),
ANALYTICS_READONLY("https://www.googleapis.com/auth/analytics.readonly", "View your Google Analytics data", false),
ANALYTICS_PROVISION("https://www.googleapis.com/auth/analytics.provision", "Create a new Google Analytics account along with its default property and view", false),
ANALYTICS_MANAGE_USERS_READONLY("https://www.googleapis.com/auth/analytics.manage.users.readonly", "View Google Analytics user permissions", false),
ANALYTICS_MANAGE_USERS("https://www.googleapis.com/auth/analytics.manage.users", "Manage Google Analytics Account users by email address", false),
ANALYTICS_EDIT("https://www.googleapis.com/auth/analytics.edit", "Edit Google Analytics management entities", false),
ANALYTICS("https://www.googleapis.com/auth/analytics", "View and manage your Google Analytics data", false),
ADSENSEHOST("https://www.googleapis.com/auth/adsensehost", "View and manage your AdSense host data and associated accounts", false),
ADSENSE_READONLY("https://www.googleapis.com/auth/adsense.readonly", "View your AdSense data", false),
ADSENSE("https://www.googleapis.com/auth/adsense", "View and manage your AdSense data", false),
ADMIN_REPORTS_USAGE_READONLY("https://www.googleapis.com/auth/admin.reports.usage.readonly", "View usage reports for your G Suite domain", false),
ADMIN_REPORTS_AUDIT_READONLY("https://www.googleapis.com/auth/admin.reports.audit.readonly", "View audit reports for your G Suite domain", false),
ADMIN_DIRECTORY_USERSCHEMA_READONLY("https://www.googleapis.com/auth/admin.directory.userschema.readonly", "View user schemas on your domain", false),
ADMIN_DIRECTORY_USERSCHEMA("https://www.googleapis.com/auth/admin.directory.userschema", "View and manage the provisioning of user schemas on your domain", false),
ADMIN_DIRECTORY_USER_SECURITY("https://www.googleapis.com/auth/admin.directory.user.security", "Manage data access permissions for users on your domain", false),
ADMIN_DIRECTORY_USER_READONLY("https://www.googleapis.com/auth/admin.directory.user.readonly", "View users on your domain", false),
ADMIN_DIRECTORY_USER_ALIAS_READONLY("https://www.googleapis.com/auth/admin.directory.user.alias.readonly", "View user aliases on your domain", false),
ADMIN_DIRECTORY_USER_ALIAS("https://www.googleapis.com/auth/admin.directory.user.alias", "View and manage user aliases on your domain", false),
ADMIN_DIRECTORY_USER("https://www.googleapis.com/auth/admin.directory.user", "View and manage the provisioning of users on your domain", false),
ADMIN_DIRECTORY_ROLEMANAGEMENT_READONLY("https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly", "View delegated admin roles for your domain", false),
ADMIN_DIRECTORY_ROLEMANAGEMENT("https://www.googleapis.com/auth/admin.directory.rolemanagement", "Manage delegated admin roles for your domain", false),
ADMIN_DIRECTORY_RESOURCE_CALENDAR_READONLY("https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly", "View calendar resources on your domain", false),
ADMIN_DIRECTORY_RESOURCE_CALENDAR("https://www.googleapis.com/auth/admin.directory.resource.calendar", "View and manage the provisioning of calendar resources on your domain", false),
ADMIN_DIRECTORY_ORGUNIT_READONLY("https://www.googleapis.com/auth/admin.directory.orgunit.readonly", "View organization units on your domain", false),
ADMIN_DIRECTORY_ORGUNIT("https://www.googleapis.com/auth/admin.directory.orgunit", "View and manage organization units on your domain", false),
ADMIN_DIRECTORY_NOTIFICATIONS("https://www.googleapis.com/auth/admin.directory.notifications", "View and manage notifications received on your domain", false),
ADMIN_DIRECTORY_GROUP_READONLY("https://www.googleapis.com/auth/admin.directory.group.readonly", "View groups on your domain", false),
ADMIN_DIRECTORY_GROUP_MEMBER_READONLY("https://www.googleapis.com/auth/admin.directory.group.member.readonly", "View group subscriptions on your domain", false),
ADMIN_DIRECTORY_GROUP_MEMBER("https://www.googleapis.com/auth/admin.directory.group.member", "View and manage group subscriptions on your domain", false),
ADMIN_DIRECTORY_GROUP("https://www.googleapis.com/auth/admin.directory.group", "View and manage the provisioning of groups on your domain", false),
ADMIN_DIRECTORY_DOMAIN_READONLY("https://www.googleapis.com/auth/admin.directory.domain.readonly", "View domains related to your customers", false),
ADMIN_DIRECTORY_DOMAIN("https://www.googleapis.com/auth/admin.directory.domain", "View and manage the provisioning of domains for your customers", false),
ADMIN_DIRECTORY_DEVICE_MOBILE_READONLY("https://www.googleapis.com/auth/admin.directory.device.mobile.readonly", "View your mobile devices' metadata", false),
ADMIN_DIRECTORY_DEVICE_MOBILE_ACTION("https://www.googleapis.com/auth/admin.directory.device.mobile.action", "Manage your mobile devices by performing administrative tasks", false),
ADMIN_DIRECTORY_DEVICE_MOBILE("https://www.googleapis.com/auth/admin.directory.device.mobile", "View and manage your mobile devices' metadata", false),
ADMIN_DIRECTORY_DEVICE_CHROMEOS_READONLY("https://www.googleapis.com/auth/admin.directory.device.chromeos.readonly", "View your Chrome OS devices' metadata", false),
ADMIN_DIRECTORY_DEVICE_CHROMEOS("https://www.googleapis.com/auth/admin.directory.device.chromeos", "View and manage your Chrome OS devices' metadata", false),
ADMIN_DIRECTORY_CUSTOMER_READONLY("https://www.googleapis.com/auth/admin.directory.customer.readonly", "View customer related information", false),
ADMIN_DIRECTORY_CUSTOMER("https://www.googleapis.com/auth/admin.directory.customer", "View and manage customer related information", false),
ADMIN_DATATRANSFER_READONLY("https://www.googleapis.com/auth/admin.datatransfer.readonly", "View data transfers between users in your organization", false),
ADMIN_DATATRANSFER("https://www.googleapis.com/auth/admin.datatransfer", "View and manage data transfers between users in your organization", false),
ADEXCHANGE_BUYER("https://www.googleapis.com/auth/adexchange.buyer", "Manage your Ad Exchange buyer account configuration", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
public static List<String> getAdminDirectoryScopes() {
return Arrays.stream(new AuthGoogleScope[]{
ADMIN_DIRECTORY_USERSCHEMA_READONLY,
ADMIN_DIRECTORY_USERSCHEMA,
ADMIN_DIRECTORY_USER_SECURITY,
ADMIN_DIRECTORY_USER_READONLY,
ADMIN_DIRECTORY_USER_ALIAS_READONLY,
ADMIN_DIRECTORY_USER_ALIAS,
ADMIN_DIRECTORY_USER,
ADMIN_DIRECTORY_ROLEMANAGEMENT_READONLY,
ADMIN_DIRECTORY_ROLEMANAGEMENT,
ADMIN_DIRECTORY_RESOURCE_CALENDAR_READONLY,
ADMIN_DIRECTORY_RESOURCE_CALENDAR,
ADMIN_DIRECTORY_ORGUNIT_READONLY,
ADMIN_DIRECTORY_ORGUNIT,
ADMIN_DIRECTORY_NOTIFICATIONS,
ADMIN_DIRECTORY_GROUP_READONLY,
ADMIN_DIRECTORY_GROUP_MEMBER_READONLY,
ADMIN_DIRECTORY_GROUP_MEMBER,
ADMIN_DIRECTORY_GROUP,
ADMIN_DIRECTORY_DOMAIN_READONLY,
ADMIN_DIRECTORY_DOMAIN,
ADMIN_DIRECTORY_DEVICE_MOBILE_READONLY,
ADMIN_DIRECTORY_DEVICE_MOBILE_ACTION,
ADMIN_DIRECTORY_DEVICE_MOBILE,
ADMIN_DIRECTORY_DEVICE_CHROMEOS_READONLY,
ADMIN_DIRECTORY_DEVICE_CHROMEOS,
ADMIN_DIRECTORY_CUSTOMER_READONLY,
ADMIN_DIRECTORY_CUSTOMER
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View And manage user's mail in Gmail.
*
* @return List
*/
public static List<String> getGmailScopes() {
return Arrays.stream(new AuthGoogleScope[]{
GMAIL,
GMAIL_SETTINGS_SHARING,
GMAIL_SETTINGS_BASIC,
GMAIL_SEND,
GMAIL_READONLY,
GMAIL_MODIFY,
GMAIL_METADATA,
GMAIL_LABELS,
GMAIL_INSERT,
GMAIL_COMPOSE,
GMAIL_ADDONS_CURRENT_MESSAGE_READONLY,
GMAIL_ADDONS_CURRENT_MESSAGE_METADATA,
GMAIL_ADDONS_CURRENT_MESSAGE_ACTION,
GMAIL_ADDONS_CURRENT_ACTION_COMPOSE
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* Used for OIDC authorization and certification
*
* @return List
*/
public static List<String> getOidcScopes() {
return Arrays.stream(new AuthGoogleScope[]{
USER_OPENID,
USER_EMAIL,
USER_PROFILE
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View And manage user's detail and Google Contacts.
*
* @return List
*/
public static List<String> getPeopleScopes() {
return Arrays.stream(new AuthGoogleScope[]{
CONTACTS_READONLY,
CONTACTS_OTHER_READONLY,
CONTACTS,
CONTACTS_FEEDS,
DIRECTORY_READONLY,
USER_PHONENUMBERS_READ,
USER_ORGANIZATION_READ,
USER_GENDER_READ,
USER_EMAILS_READ,
USER_BIRTHDAY_READ,
USER_ADDRESSES_READ,
USERINFO_PROFILE,
USERINFO_EMAIL
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View and manage user's photo library.
*
* @return List
*/
public static List<String> getPhotosLibraryScopes() {
return Arrays.stream(new AuthGoogleScope[]{
PHOTOSLIBRARY_SHARING,
PHOTOSLIBRARY_READONLY_APPCREATEDDATA,
PHOTOSLIBRARY_READONLY,
PHOTOSLIBRARY_APPENDONLY,
PHOTOSLIBRARY
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View And manage user's videos, activity and playlists.
*
* @return List
*/
public static List<String> getYouTubeScopes() {
return Arrays.stream(new AuthGoogleScope[]{
YT_ANALYTICS_READONLY,
YT_ANALYTICS_MONETARY_READONLY,
YOUTUBEPARTNER_CHANNEL_AUDIT,
YOUTUBEPARTNER,
YOUTUBE_UPLOAD,
YOUTUBE_READONLY,
YOUTUBE_FORCE_SSL,
YOUTUBE_CHANNEL_MEMBERSHIPS_CREATOR,
YOUTUBE
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View And manage user's Google Analytics.
*
* @return List
*/
public static List<String> getGoogleAnalyticsScopes() {
return Arrays.stream(new AuthGoogleScope[]{
ANALYTICS_USER_DELETION,
ANALYTICS_READONLY,
ANALYTICS_PROVISION,
ANALYTICS_MANAGE_USERS_READONLY,
ANALYTICS_MANAGE_USERS,
ANALYTICS_EDIT,
ANALYTICS
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* View And manage user's calendars in Google Calendar.
*
* @return List
*/
public static List<String> getCalendarScopes() {
return Arrays.stream(new AuthGoogleScope[]{
CALENDAR_SETTINGS_READONLY,
CALENDAR_READONLY,
CALENDAR_EVENTS_READONLY,
CALENDAR_EVENTS,
CALENDAR,
CALENDAR_FEEDS
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
/**
* List, download, create, move, edit, share and search all of user's documents and files in Google Drive.
*
* @return List
*/
public static List<String> getDriveScopes() {
return Arrays.stream(new AuthGoogleScope[]{
DRIVE_SCRIPTS,
DRIVE_READONLY,
DRIVE_PHOTOS_READONLY,
DRIVE_METADATA_READONLY,
DRIVE_METADATA,
DRIVE_FILE,
DRIVE_APPDATA,
DRIVE_ACTIVITY_READONLY,
DRIVE_ACTIVITY,
DRIVE,
ACTIVITY
}).map(AuthGoogleScope::getScope).collect(Collectors.toList());
}
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 华为平台 OAuth 授权范围
*
* 当前方式未来可能被废弃,建议使用 {@link AuthHuaweiV3Scope}
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
@Deprecated
public enum AuthHuaweiScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
BASE_PROFILE("https://www.huawei.com/auth/account/base.profile", "获取用户的基本信息", true),
MOBILE_NUMBER("https://www.huawei.com/auth/account/mobile.number", "获取用户的手机号", false),
ACCOUNTLIST("https://www.huawei.com/auth/account/accountlist", "获取用户的账单列表", false),
/**
* 以下两个 scope 不需要经过华为评估和验证
*/
SCOPE_DRIVE_FILE("https://www.huawei.com/auth/drive.file", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_APPDATA("https://www.huawei.com/auth/drive.appdata", "只允许访问由应用程序创建或打开的文件", false),
/**
* 以下四个 scope 使用前需要向drivekit@huawei.com提交申请
* <p>
* 参考:https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/server-dev-0000001050039664-V5#ZH-CN_TOPIC_0000001050039664__section1618418855716
*/
SCOPE_DRIVE("https://www.huawei.com/auth/drive", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_READONLY("https://www.huawei.com/auth/drive.readonly", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_METADATA("https://www.huawei.com/auth/drive.metadata", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_METADATA_READONLY("https://www.huawei.com/auth/drive.metadata.readonly", "只允许访问由应用程序创建或打开的文件", false),
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiV3Scope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 华为平台 V3 版本 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.16.7
*/
@Getter
@AllArgsConstructor
public enum AuthHuaweiV3Scope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
OPENID("openid", "基础scope,v3必选", true),
/**
* {@code scope} 含义,以{@code description} 为准
*/
BASE_PROFILE("https://www.huawei.com/auth/account/base.profile", "获取用户的基本信息", true),
MOBILE_NUMBER("https://www.huawei.com/auth/account/mobile.number", "获取用户的手机号", false),
ACCOUNTLIST("https://www.huawei.com/auth/account/accountlist", "获取用户的账单列表", false),
/**
* 以下两个 scope 不需要经过华为评估和验证
*/
SCOPE_DRIVE_FILE("https://www.huawei.com/auth/drive.file", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_APPDATA("https://www.huawei.com/auth/drive.appdata", "只允许访问由应用程序创建或打开的文件", false),
/**
* 以下四个 scope 使用前需要向drivekit@huawei.com提交申请
* <p>
* 参考:https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides-V5/server-dev-0000001050039664-V5#ZH-CN_TOPIC_0000001050039664__section1618418855716
*/
SCOPE_DRIVE("https://www.huawei.com/auth/drive", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_READONLY("https://www.huawei.com/auth/drive.readonly", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_METADATA("https://www.huawei.com/auth/drive.metadata", "只允许访问由应用程序创建或打开的文件", false),
SCOPE_DRIVE_METADATA_READONLY("https://www.huawei.com/auth/drive.metadata.readonly", "只允许访问由应用程序创建或打开的文件", false),
;
;
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthJdScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 京东平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthJdScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
SNSAPI_BASE("snsapi_base", "基础授权", true);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthKujialeScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 酷家乐平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthKujialeScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
GET_USER_INFO("get_user_info", "获取用户的基本信息", true),
GET_DESIGN("get_design", "获取指定方案详情", false),
GET_BUDGET_LIST("get_budget_list", "获取清单预算概览数据", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthLineScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* Line 平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @since 1.16.0
*/
@Getter
@AllArgsConstructor
public enum AuthLineScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
PROFILE("profile", "Get profile details", true),
OPENID("openid", "Get id token", true),
EMAIL("email", "Get email (separate authorization required)", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthLinkedinScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 领英平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Getter
@AllArgsConstructor
public enum AuthLinkedinScope implements AuthScope {
/**
* {@code scope} 含义,以{@code description} 为准
*/
R_LITEPROFILE("r_liteprofile", "Use your name, headline, and photo", true),
R_EMAILADDRESS("r_emailaddress", "Use the primary email address associated with your LinkedIn account", true),
W_MEMBER_SOCIAL("w_member_social", "Post, comment and like posts on your behalf", true),
R_MEMBER_SOCIAL("r_member_social", "Retrieve your posts, comments, likes, and other engagement data", false),
R_AD_CAMPAIGNS("r_ad_campaigns", "View advertising campaigns you manage", false),
R_ADS("r_ads", "Retrieve your advertising accounts", false),
R_ADS_LEADGEN_AUTOMATION("r_ads_leadgen_automation", "Access your Lead Gen Forms and retrieve leads", false),
R_ADS_REPORTING("r_ads_reporting", "Retrieve reporting for your advertising accounts", false),
R_BASICPROFILE("r_basicprofile", "Use your basic profile including your name, photo, headline, and current positions", false),
R_ORGANIZATION_SOCIAL("r_organization_social", "Retrieve your organizations' posts, including any comments, likes and other engagement data", false),
RW_AD_CAMPAIGNS("rw_ad_campaigns", "Manage your advertising campaigns", false),
RW_ADS("rw_ads", "Manage your advertising accounts", false),
RW_COMPANY_ADMIN("rw_company_admin", "For V1 callsManage your organization's page and post updates", false),
RW_DMP_SEGMENTS("rw_dmp_segments", "Create and manage your matched audiences", false),
RW_ORGANIZATION_ADMIN("rw_organization_admin", "Manage your organizations' pages and retrieve reporting data", false),
RW_ORGANIZATION("rw_organization", "For V2 callsManage your organization's page and post updates", false),
W_ORGANIZATION_SOCIAL("w_organization_social", "Post, comment and like posts on your organization's behalf", false),
W_SHARE("w_share", "Post updates to LinkedIn as you", false);
private final String scope;
private final String description;
private final boolean isDefault;
}
================================================
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthMiScope.java
================================================
package me.zhyd.oauth.enums.scope;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 小米平台 OAuth 授权范围
*
* @author yadong.zhang (yadong.zhang04
gitextract_3291mr22/
├── .editorconfig
├── .gitee/
│ ├── ISSUE_TEMPLATE.zh-CN.md
│ └── PULL_REQUEST_TEMPLATE.zh-CN.md
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ ├── feature_request.md
│ │ └── request-help.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ ├── deploy-snapshot.yml
│ └── test-pr.yml
├── .gitignore
├── .travis.yml
├── CHANGELOGS.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.en-US.md
├── README.md
├── bin/
│ ├── pull-dev.sh
│ ├── pull.sh
│ ├── push-dev.sh
│ ├── push.sh
│ ├── repVersion.sh
│ ├── updVersion.sh
│ └── version.txt
├── docs/
│ ├── .nojekyll
│ └── index.html
├── example.md
├── ja.sh
├── pom.xml
└── src/
├── main/
│ └── java/
│ └── me/
│ └── zhyd/
│ └── oauth/
│ ├── AuthRequestBuilder.java
│ ├── cache/
│ │ ├── AuthCache.java
│ │ ├── AuthCacheConfig.java
│ │ ├── AuthCacheScheduler.java
│ │ ├── AuthDefaultCache.java
│ │ ├── AuthDefaultStateCache.java
│ │ ├── AuthStateCache.java
│ │ └── package-info.java
│ ├── config/
│ │ ├── AuthConfig.java
│ │ ├── AuthDefaultSource.java
│ │ ├── AuthSource.java
│ │ ├── JustAuthLogConfig.java
│ │ └── package-info.java
│ ├── enums/
│ │ ├── AuthResponseStatus.java
│ │ ├── AuthToutiaoErrorCode.java
│ │ ├── AuthUserGender.java
│ │ ├── package-info.java
│ │ └── scope/
│ │ ├── AuthAmazonScope.java
│ │ ├── AuthAppleScope.java
│ │ ├── AuthBaiduScope.java
│ │ ├── AuthCodingScope.java
│ │ ├── AuthDingTalkScope.java
│ │ ├── AuthDouyinScope.java
│ │ ├── AuthFacebookScope.java
│ │ ├── AuthFigmaScope.java
│ │ ├── AuthGiteeScope.java
│ │ ├── AuthGithubScope.java
│ │ ├── AuthGitlabScope.java
│ │ ├── AuthGoogleScope.java
│ │ ├── AuthHuaweiScope.java
│ │ ├── AuthHuaweiV3Scope.java
│ │ ├── AuthJdScope.java
│ │ ├── AuthKujialeScope.java
│ │ ├── AuthLineScope.java
│ │ ├── AuthLinkedinScope.java
│ │ ├── AuthMiScope.java
│ │ ├── AuthMicrosoftScope.java
│ │ ├── AuthOktaScope.java
│ │ ├── AuthPinterestScope.java
│ │ ├── AuthProginnScope.java
│ │ ├── AuthQqScope.java
│ │ ├── AuthRenrenScope.java
│ │ ├── AuthScope.java
│ │ ├── AuthSlackScope.java
│ │ ├── AuthStackoverflowScope.java
│ │ ├── AuthWeChatEnterpriseWebScope.java
│ │ ├── AuthWechatMpScope.java
│ │ ├── AuthWeiboScope.java
│ │ └── package-info.java
│ ├── exception/
│ │ ├── AuthException.java
│ │ └── package-info.java
│ ├── log/
│ │ ├── Log.java
│ │ └── package-info.java
│ ├── model/
│ │ ├── AuthCallback.java
│ │ ├── AuthResponse.java
│ │ ├── AuthToken.java
│ │ ├── AuthUser.java
│ │ └── package-info.java
│ ├── package-info.java
│ ├── request/
│ │ ├── AbstractAuthDingtalkRequest.java
│ │ ├── AbstractAuthMicrosoftRequest.java
│ │ ├── AbstractAuthWeChatEnterpriseRequest.java
│ │ ├── AuthAfDianRequest.java
│ │ ├── AuthAlipayCertRequest.java
│ │ ├── AuthAlipayRequest.java
│ │ ├── AuthAliyunRequest.java
│ │ ├── AuthAmazonRequest.java
│ │ ├── AuthAppleRequest.java
│ │ ├── AuthBaiduRequest.java
│ │ ├── AuthCodingRequest.java
│ │ ├── AuthCsdnRequest.java
│ │ ├── AuthDefaultRequest.java
│ │ ├── AuthDingTalkAccountRequest.java
│ │ ├── AuthDingTalkRequest.java
│ │ ├── AuthDingTalkV2Request.java
│ │ ├── AuthDouyinRequest.java
│ │ ├── AuthElemeRequest.java
│ │ ├── AuthFacebookRequest.java
│ │ ├── AuthFeishuRequest.java
│ │ ├── AuthFigmaRequest.java
│ │ ├── AuthGiteeRequest.java
│ │ ├── AuthGithubRequest.java
│ │ ├── AuthGitlabRequest.java
│ │ ├── AuthGoogleRequest.java
│ │ ├── AuthHuaweiRequest.java
│ │ ├── AuthHuaweiV3Request.java
│ │ ├── AuthJdRequest.java
│ │ ├── AuthKujialeRequest.java
│ │ ├── AuthLineRequest.java
│ │ ├── AuthLinkedinRequest.java
│ │ ├── AuthMeituanRequest.java
│ │ ├── AuthMiRequest.java
│ │ ├── AuthMicrosoftCnRequest.java
│ │ ├── AuthMicrosoftRequest.java
│ │ ├── AuthOktaRequest.java
│ │ ├── AuthOschinaRequest.java
│ │ ├── AuthPinterestRequest.java
│ │ ├── AuthProginnRequest.java
│ │ ├── AuthQQMiniProgramRequest.java
│ │ ├── AuthQqRequest.java
│ │ ├── AuthRenrenRequest.java
│ │ ├── AuthRequest.java
│ │ ├── AuthSlackRequest.java
│ │ ├── AuthStackOverflowRequest.java
│ │ ├── AuthTaobaoRequest.java
│ │ ├── AuthTeambitionRequest.java
│ │ ├── AuthToutiaoRequest.java
│ │ ├── AuthTwitterRequest.java
│ │ ├── AuthWeChatEnterpriseQrcodeRequest.java
│ │ ├── AuthWeChatEnterpriseQrcodeV2Request.java
│ │ ├── AuthWeChatEnterpriseThirdQrcodeRequest.java
│ │ ├── AuthWeChatEnterpriseWebRequest.java
│ │ ├── AuthWeChatMpRequest.java
│ │ ├── AuthWeChatOpenRequest.java
│ │ ├── AuthWechatMiniProgramRequest.java
│ │ ├── AuthWeiboRequest.java
│ │ ├── AuthXmlyRequest.java
│ │ └── package-info.java
│ └── utils/
│ ├── AuthChecker.java
│ ├── AuthScopeUtils.java
│ ├── AuthStateUtils.java
│ ├── Base64Utils.java
│ ├── GlobalAuthUtils.java
│ ├── HttpUtils.java
│ ├── IpUtils.java
│ ├── PkceUtil.java
│ ├── RandomUtil.java
│ ├── Sha256.java
│ ├── StringUtils.java
│ ├── UrlBuilder.java
│ ├── UuidUtils.java
│ └── package-info.java
└── test/
└── java/
└── me/
└── zhyd/
└── oauth/
├── AuthRequestBuilderTest.java
├── cache/
│ └── AuthStateCacheTest.java
├── config/
│ └── AuthExtendSource.java
├── log/
│ └── LogTest.java
├── model/
│ └── AuthUserTest.java
├── request/
│ ├── AuthExtendRequest.java
│ ├── AuthExtendRequestTest.java
│ ├── AuthWeChatEnterpriseWebRequestTest.java
│ └── AuthWeChatMpRequestTest.java
└── utils/
├── GlobalAuthUtilsTest.java
├── JsonPathTest.java
├── ScopeTest.java
├── StringUtilsTest.java
├── UrlBuilderTest.java
└── UuidUtilsTest.java
SYMBOL INDEX (1043 symbols across 137 files)
FILE: src/main/java/me/zhyd/oauth/AuthRequestBuilder.java
class AuthRequestBuilder (line 24) | public class AuthRequestBuilder {
method AuthRequestBuilder (line 30) | private AuthRequestBuilder() {
method builder (line 34) | public static AuthRequestBuilder builder() {
method source (line 38) | public AuthRequestBuilder source(String source) {
method authConfig (line 43) | public AuthRequestBuilder authConfig(AuthConfig authConfig) {
method authConfig (line 48) | public AuthRequestBuilder authConfig(Function<String, AuthConfig> auth...
method authStateCache (line 53) | public AuthRequestBuilder authStateCache(AuthStateCache authStateCache) {
method extendSource (line 58) | public AuthRequestBuilder extendSource(AuthSource... extendSource) {
method build (line 63) | public AuthRequest build() {
method concat (line 91) | private AuthSource[] concat(AuthSource[] first, AuthSource[] second) {
FILE: src/main/java/me/zhyd/oauth/cache/AuthCache.java
type AuthCache (line 9) | public interface AuthCache {
method set (line 17) | void set(String key, String value);
method set (line 26) | void set(String key, String value, long timeout);
method get (line 34) | String get(String key);
method containsKey (line 42) | boolean containsKey(String key);
method pruneCache (line 47) | default void pruneCache() {
FILE: src/main/java/me/zhyd/oauth/cache/AuthCacheConfig.java
class AuthCacheConfig (line 9) | public class AuthCacheConfig {
FILE: src/main/java/me/zhyd/oauth/cache/AuthCacheScheduler.java
type AuthCacheScheduler (line 14) | public enum AuthCacheScheduler {
method AuthCacheScheduler (line 24) | AuthCacheScheduler() {
method create (line 28) | private void create() {
method shutdown (line 33) | public void shutdown() {
method schedule (line 39) | public void schedule(Runnable task, long delay) {
FILE: src/main/java/me/zhyd/oauth/cache/AuthDefaultCache.java
class AuthDefaultCache (line 19) | public class AuthDefaultCache implements AuthCache {
method AuthDefaultCache (line 29) | public AuthDefaultCache() {
method set (line 41) | @Override
method set (line 53) | @Override
method get (line 69) | @Override
method containsKey (line 89) | @Override
method pruneCache (line 103) | @Override
method schedulePrune (line 120) | public void schedulePrune(long delay) {
class CacheState (line 124) | @Getter
method CacheState (line 130) | CacheState(String state, long expire) {
method isExpired (line 136) | boolean isExpired() {
FILE: src/main/java/me/zhyd/oauth/cache/AuthDefaultStateCache.java
type AuthDefaultStateCache (line 9) | public enum AuthDefaultStateCache implements AuthStateCache {
method AuthDefaultStateCache (line 18) | AuthDefaultStateCache() {
method cache (line 28) | @Override
method cache (line 40) | @Override
method get (line 51) | @Override
method containsKey (line 62) | @Override
FILE: src/main/java/me/zhyd/oauth/cache/AuthStateCache.java
type AuthStateCache (line 11) | public interface AuthStateCache {
method cache (line 18) | void cache(String key, String value);
method cache (line 27) | void cache(String key, String value, long timeout);
method get (line 35) | String get(String key);
method containsKey (line 43) | boolean containsKey(String key);
FILE: src/main/java/me/zhyd/oauth/config/AuthConfig.java
class AuthConfig (line 16) | @Getter
method getAuthServerId (line 181) | public String getAuthServerId() {
FILE: src/main/java/me/zhyd/oauth/config/AuthDefaultSource.java
type AuthDefaultSource (line 13) | public enum AuthDefaultSource implements AuthSource {
method authorize (line 18) | @Override
method accessToken (line 23) | @Override
method userInfo (line 28) | @Override
method getTargetClass (line 33) | @Override
method authorize (line 42) | @Override
method accessToken (line 47) | @Override
method userInfo (line 52) | @Override
method revoke (line 57) | @Override
method getTargetClass (line 62) | @Override
method authorize (line 71) | @Override
method accessToken (line 76) | @Override
method userInfo (line 81) | @Override
method getTargetClass (line 86) | @Override
method authorize (line 95) | @Override
method accessToken (line 100) | @Override
method userInfo (line 105) | @Override
method getTargetClass (line 110) | @Override
method authorize (line 119) | @Override
method accessToken (line 124) | @Override
method userInfo (line 129) | @Override
method getTargetClass (line 134) | @Override
method authorize (line 143) | @Override
method accessToken (line 148) | @Override
method userInfo (line 153) | @Override
method getTargetClass (line 158) | @Override
method authorize (line 167) | @Override
method accessToken (line 172) | @Override
method userInfo (line 177) | @Override
method revoke (line 182) | @Override
method refresh (line 187) | @Override
method getTargetClass (line 192) | @Override
method authorize (line 201) | @Override
method accessToken (line 206) | @Override
method userInfo (line 211) | @Override
method getTargetClass (line 216) | @Override
method authorize (line 228) | @Override
method accessToken (line 233) | @Override
method userInfo (line 238) | @Override
method getTargetClass (line 243) | @Override
method authorize (line 252) | @Override
method accessToken (line 257) | @Override
method userInfo (line 262) | @Override
method getTargetClass (line 267) | @Override
method authorize (line 276) | @Override
method accessToken (line 281) | @Override
method userInfo (line 286) | @Override
method getTargetClass (line 291) | @Override
method authorize (line 300) | @Override
method accessToken (line 305) | @Override
method userInfo (line 310) | @Override
method refresh (line 315) | @Override
method getTargetClass (line 320) | @Override
method authorize (line 329) | @Override
method accessToken (line 334) | @Override
method userInfo (line 339) | @Override
method refresh (line 344) | @Override
method getTargetClass (line 349) | @Override
method authorize (line 358) | @Override
method accessToken (line 363) | @Override
method userInfo (line 368) | @Override
method refresh (line 373) | @Override
method getTargetClass (line 378) | @Override
method authorize (line 387) | @Override
method accessToken (line 392) | @Override
method userInfo (line 397) | @Override
method getTargetClass (line 402) | @Override
method authorize (line 412) | @Override
method accessToken (line 417) | @Override
method userInfo (line 422) | @Override
method getTargetClass (line 427) | @Override
method authorize (line 436) | @Override
method accessToken (line 441) | @Override
method userInfo (line 446) | @Override
method getTargetClass (line 451) | @Override
method authorize (line 460) | @Override
method accessToken (line 465) | @Override
method userInfo (line 470) | @Override
method refresh (line 475) | @Override
method getTargetClass (line 480) | @Override
method authorize (line 489) | @Override
method accessToken (line 494) | @Override
method userInfo (line 499) | @Override
method refresh (line 504) | @Override
method getTargetClass (line 509) | @Override
method authorize (line 518) | @Override
method accessToken (line 523) | @Override
method userInfo (line 528) | @Override
method refresh (line 533) | @Override
method getTargetClass (line 538) | @Override
method authorize (line 547) | @Override
method accessToken (line 552) | @Override
method userInfo (line 557) | @Override
method refresh (line 562) | @Override
method getTargetClass (line 567) | @Override
method authorize (line 574) | @Override
method accessToken (line 579) | @Override
method userInfo (line 584) | @Override
method refresh (line 589) | @Override
method getTargetClass (line 594) | @Override
method authorize (line 603) | @Override
method accessToken (line 608) | @Override
method userInfo (line 613) | @Override
method getTargetClass (line 618) | @Override
method authorize (line 627) | @Override
method accessToken (line 632) | @Override
method refresh (line 637) | @Override
method userInfo (line 642) | @Override
method getTargetClass (line 647) | @Override
method authorize (line 657) | @Override
method accessToken (line 662) | @Override
method refresh (line 667) | @Override
method userInfo (line 672) | @Override
method getTargetClass (line 677) | @Override
method authorize (line 687) | @Override
method accessToken (line 692) | @Override
method userInfo (line 697) | @Override
method getTargetClass (line 702) | @Override
method authorize (line 712) | @Override
method accessToken (line 717) | @Override
method userInfo (line 722) | @Override
method getTargetClass (line 727) | @Override
method authorize (line 742) | @Override
method accessToken (line 747) | @Override
method userInfo (line 752) | @Override
method refresh (line 757) | @Override
method getTargetClass (line 762) | @Override
method authorize (line 774) | @Override
method accessToken (line 779) | @Override
method userInfo (line 784) | @Override
method refresh (line 789) | @Override
method getTargetClass (line 794) | @Override
method authorize (line 806) | @Override
method accessToken (line 811) | @Override
method userInfo (line 816) | @Override
method getTargetClass (line 821) | @Override
method authorize (line 832) | @Override
method accessToken (line 837) | @Override
method userInfo (line 842) | @Override
method getTargetClass (line 847) | @Override
method authorize (line 861) | @Override
method accessToken (line 871) | @Override
method userInfo (line 881) | @Override
method getTargetClass (line 886) | @Override
method authorize (line 895) | @Override
method accessToken (line 900) | @Override
method userInfo (line 905) | @Override
method getTargetClass (line 910) | @Override
method authorize (line 922) | @Override
method accessToken (line 927) | @Override
method userInfo (line 932) | @Override
method refresh (line 937) | @Override
method getTargetClass (line 942) | @Override
method authorize (line 954) | @Override
method accessToken (line 959) | @Override
method userInfo (line 964) | @Override
method getTargetClass (line 969) | @Override
method authorize (line 981) | @Override
method accessToken (line 986) | @Override
method userInfo (line 991) | @Override
method refresh (line 996) | @Override
method getTargetClass (line 1001) | @Override
method authorize (line 1015) | @Override
method accessToken (line 1020) | @Override
method userInfo (line 1025) | @Override
method refresh (line 1030) | @Override
method getTargetClass (line 1035) | @Override
method authorize (line 1047) | @Override
method accessToken (line 1052) | @Override
method userInfo (line 1057) | @Override
method getTargetClass (line 1062) | @Override
method authorize (line 1076) | @Override
method accessToken (line 1081) | @Override
method userInfo (line 1086) | @Override
method refresh (line 1091) | @Override
method getTargetClass (line 1096) | @Override
method authorize (line 1107) | @Override
method accessToken (line 1112) | @Override
method userInfo (line 1117) | @Override
method refresh (line 1122) | @Override
method getTargetClass (line 1127) | @Override
method authorize (line 1137) | @Override
method accessToken (line 1142) | @Override
method userInfo (line 1147) | @Override
method refresh (line 1152) | @Override
method getTargetClass (line 1157) | @Override
method authorize (line 1167) | @Override
method accessToken (line 1172) | @Override
method userInfo (line 1177) | @Override
method refresh (line 1182) | @Override
method getTargetClass (line 1187) | @Override
method authorize (line 1199) | @Override
method accessToken (line 1204) | @Override
method userInfo (line 1209) | @Override
method refresh (line 1214) | @Override
method getTargetClass (line 1219) | @Override
method authorize (line 1230) | @Override
method accessToken (line 1242) | @Override
method userInfo (line 1247) | @Override
method revoke (line 1252) | @Override
method getTargetClass (line 1257) | @Override
method authorize (line 1268) | @Override
method accessToken (line 1273) | @Override
method userInfo (line 1278) | @Override
method refresh (line 1283) | @Override
method revoke (line 1288) | @Override
method getTargetClass (line 1293) | @Override
method authorize (line 1306) | @Override
method accessToken (line 1311) | @Override
method refresh (line 1316) | @Override
method userInfo (line 1321) | @Override
method revoke (line 1326) | @Override
method getTargetClass (line 1331) | @Override
method authorize (line 1342) | @Override
method accessToken (line 1347) | @Override
method userInfo (line 1352) | @Override
method getTargetClass (line 1357) | @Override
method authorize (line 1366) | @Override
method accessToken (line 1371) | @Override
method userInfo (line 1376) | @Override
method getTargetClass (line 1381) | @Override
method authorize (line 1388) | @Override
method accessToken (line 1396) | @Override
method userInfo (line 1401) | @Override
method getTargetClass (line 1406) | @Override
method authorize (line 1413) | @Override
method accessToken (line 1418) | @Override
method userInfo (line 1423) | @Override
method refresh (line 1428) | @Override
method getTargetClass (line 1433) | @Override
method authorize (line 1444) | @Override
method accessToken (line 1450) | @Override
method userInfo (line 1457) | @Override
method getTargetClass (line 1463) | @Override
method authorize (line 1473) | @Override
method accessToken (line 1479) | @Override
method userInfo (line 1486) | @Override
method getTargetClass (line 1492) | @Override
FILE: src/main/java/me/zhyd/oauth/config/AuthSource.java
type AuthSource (line 25) | public interface AuthSource {
method authorize (line 32) | String authorize();
method accessToken (line 39) | String accessToken();
method userInfo (line 46) | String userInfo();
method revoke (line 53) | default String revoke() {
method refresh (line 62) | default String refresh() {
method getName (line 71) | default String getName() {
method getTargetClass (line 83) | Class<? extends AuthDefaultRequest> getTargetClass();
FILE: src/main/java/me/zhyd/oauth/config/JustAuthLogConfig.java
class JustAuthLogConfig (line 10) | public class JustAuthLogConfig {
method setLevel (line 17) | public static void setLevel(Log.Level level) {
method disable (line 24) | public static void disable() {
method enable (line 31) | public static void enable() {
FILE: src/main/java/me/zhyd/oauth/enums/AuthResponseStatus.java
type AuthResponseStatus (line 12) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/AuthToutiaoErrorCode.java
type AuthToutiaoErrorCode (line 12) | @Getter
method getErrorCode (line 40) | public static AuthToutiaoErrorCode getErrorCode(int errorCode) {
FILE: src/main/java/me/zhyd/oauth/enums/AuthUserGender.java
type AuthUserGender (line 15) | @Getter
method getRealGender (line 35) | public static AuthUserGender getRealGender(String originalGender) {
method getWechatRealGender (line 53) | public static AuthUserGender getWechatRealGender(String originalGender) {
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthAmazonScope.java
type AuthAmazonScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthAppleScope.java
type AuthAppleScope (line 9) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthBaiduScope.java
type AuthBaiduScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthCodingScope.java
type AuthCodingScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthDingTalkScope.java
type AuthDingTalkScope (line 15) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthDouyinScope.java
type AuthDouyinScope (line 15) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthFacebookScope.java
type AuthFacebookScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthFigmaScope.java
type AuthFigmaScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGiteeScope.java
type AuthGiteeScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGithubScope.java
type AuthGithubScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGitlabScope.java
type AuthGitlabScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthGoogleScope.java
type AuthGoogleScope (line 17) | @Getter
method getAdminDirectoryScopes (line 289) | public static List<String> getAdminDirectoryScopes() {
method getGmailScopes (line 326) | public static List<String> getGmailScopes() {
method getOidcScopes (line 351) | public static List<String> getOidcScopes() {
method getPeopleScopes (line 364) | public static List<String> getPeopleScopes() {
method getPhotosLibraryScopes (line 388) | public static List<String> getPhotosLibraryScopes() {
method getYouTubeScopes (line 403) | public static List<String> getYouTubeScopes() {
method getGoogleAnalyticsScopes (line 422) | public static List<String> getGoogleAnalyticsScopes() {
method getCalendarScopes (line 439) | public static List<String> getCalendarScopes() {
method getDriveScopes (line 455) | public static List<String> getDriveScopes() {
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiScope.java
type AuthHuaweiScope (line 15) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiV3Scope.java
type AuthHuaweiV3Scope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthJdScope.java
type AuthJdScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthKujialeScope.java
type AuthKujialeScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthLineScope.java
type AuthLineScope (line 12) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthLinkedinScope.java
type AuthLinkedinScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthMiScope.java
type AuthMiScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthMicrosoftScope.java
type AuthMicrosoftScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthOktaScope.java
type AuthOktaScope (line 12) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthPinterestScope.java
type AuthPinterestScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthProginnScope.java
type AuthProginnScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthQqScope.java
type AuthQqScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthRenrenScope.java
type AuthRenrenScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthScope.java
type AuthScope (line 10) | public interface AuthScope {
method getScope (line 17) | String getScope();
method isDefault (line 24) | boolean isDefault();
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthSlackScope.java
type AuthSlackScope (line 12) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthStackoverflowScope.java
type AuthStackoverflowScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthWeChatEnterpriseWebScope.java
type AuthWeChatEnterpriseWebScope (line 12) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthWechatMpScope.java
type AuthWechatMpScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/enums/scope/AuthWeiboScope.java
type AuthWeiboScope (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/exception/AuthException.java
class AuthException (line 12) | public class AuthException extends RuntimeException {
method AuthException (line 17) | public AuthException(String errorMsg) {
method AuthException (line 21) | public AuthException(String errorMsg, AuthSource source) {
method AuthException (line 25) | public AuthException(int errorCode, String errorMsg) {
method AuthException (line 31) | public AuthException(AuthResponseStatus status) {
method AuthException (line 35) | public AuthException(int errorCode, String errorMsg, AuthSource source) {
method AuthException (line 39) | public AuthException(AuthResponseStatus status, AuthSource source) {
method AuthException (line 43) | public AuthException(String message, Throwable cause) {
method AuthException (line 47) | public AuthException(Throwable cause) {
method getErrorCode (line 51) | public int getErrorCode() {
method getErrorMsg (line 55) | public String getErrorMsg() {
FILE: src/main/java/me/zhyd/oauth/log/Log.java
class Log (line 22) | public class Log {
method debug (line 24) | public static void debug(String msg) {
method warn (line 28) | public static void warn(String msg) {
method error (line 32) | public static void error(String msg) {
method debug (line 36) | public static void debug(String msg, Throwable t) {
method warn (line 40) | public static void warn(String msg, Throwable t) {
method error (line 44) | public static void error(String msg, Throwable t) {
method print (line 56) | private static void print(Level level, String msg, Throwable t, PrintS...
method getCaller (line 71) | private static String getCaller() {
method getDate (line 92) | private static String getDate() {
method writeThrowable (line 102) | private static void writeThrowable(Throwable t, PrintStream targetStre...
type Level (line 114) | @Getter
class Config (line 139) | public static class Config {
FILE: src/main/java/me/zhyd/oauth/model/AuthCallback.java
class AuthCallback (line 18) | @Getter
method getCode (line 73) | public String getCode() {
FILE: src/main/java/me/zhyd/oauth/model/AuthResponse.java
class AuthResponse (line 14) | @Getter
method ok (line 40) | public boolean ok() {
FILE: src/main/java/me/zhyd/oauth/model/AuthToken.java
class AuthToken (line 13) | @Getter
FILE: src/main/java/me/zhyd/oauth/model/AuthUser.java
class AuthUser (line 14) | @Getter
FILE: src/main/java/me/zhyd/oauth/request/AbstractAuthDingtalkRequest.java
class AbstractAuthDingtalkRequest (line 25) | public abstract class AbstractAuthDingtalkRequest extends AuthDefaultReq...
method AbstractAuthDingtalkRequest (line 27) | public AbstractAuthDingtalkRequest(AuthConfig config, AuthSource sourc...
method AbstractAuthDingtalkRequest (line 32) | public AbstractAuthDingtalkRequest(AuthConfig config, AuthSource sourc...
method getAccessToken (line 36) | @Override
method getUserInfo (line 41) | @Override
method authorize (line 74) | @Override
method userInfoUrl (line 91) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AbstractAuthMicrosoftRequest.java
class AbstractAuthMicrosoftRequest (line 30) | public abstract class AbstractAuthMicrosoftRequest extends AuthDefaultRe...
method AbstractAuthMicrosoftRequest (line 32) | public AbstractAuthMicrosoftRequest(AuthConfig config, AuthSource sour...
method AbstractAuthMicrosoftRequest (line 37) | public AbstractAuthMicrosoftRequest(AuthConfig config, AuthSource sour...
method getAccessToken (line 41) | @Override
method getToken (line 52) | private AuthToken getToken(String accessTokenUrl) {
method checkResponse (line 76) | private void checkResponse(JSONObject object) {
method getUserInfo (line 82) | @Override
method refresh (line 113) | @Override
method authorize (line 128) | @Override
method accessTokenUrl (line 149) | @Override
method userInfoUrl (line 168) | @Override
method refreshTokenUrl (line 179) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AbstractAuthWeChatEnterpriseRequest.java
class AbstractAuthWeChatEnterpriseRequest (line 25) | public abstract class AbstractAuthWeChatEnterpriseRequest extends AuthDe...
method AbstractAuthWeChatEnterpriseRequest (line 27) | public AbstractAuthWeChatEnterpriseRequest(AuthConfig config, AuthSour...
method AbstractAuthWeChatEnterpriseRequest (line 32) | public AbstractAuthWeChatEnterpriseRequest(AuthConfig config, AuthSour...
method getAccessToken (line 36) | @Override
method getUserInfo (line 49) | @Override
method checkResponse (line 82) | private JSONObject checkResponse(String response) {
method accessTokenUrl (line 99) | @Override
method userInfoUrl (line 113) | @Override
method getUserDetail (line 129) | private JSONObject getUserDetail(String accessToken, String userId, St...
FILE: src/main/java/me/zhyd/oauth/request/AuthAfDianRequest.java
class AuthAfDianRequest (line 22) | public class AuthAfDianRequest extends AuthDefaultRequest {
method AuthAfDianRequest (line 24) | public AuthAfDianRequest(AuthConfig config) {
method AuthAfDianRequest (line 28) | public AuthAfDianRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 32) | @Override
method getUserInfo (line 46) | @Override
method authorize (line 62) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthAlipayCertRequest.java
class AuthAlipayCertRequest (line 31) | public class AuthAlipayCertRequest extends AuthDefaultRequest {
method AuthAlipayCertRequest (line 35) | public AuthAlipayCertRequest(AuthConfig config, AlipayConfig alipayCon...
method checkCode (line 44) | @Override
method getAccessToken (line 51) | @Override
method refresh (line 80) | @Override
method getUserInfo (line 105) | @Override
method authorize (line 143) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java
class AuthAlipayRequest (line 34) | public class AuthAlipayRequest extends AuthDefaultRequest {
method AuthAlipayRequest (line 50) | @Deprecated
method AuthAlipayRequest (line 59) | @Deprecated
method AuthAlipayRequest (line 68) | @Deprecated
method AuthAlipayRequest (line 80) | public AuthAlipayRequest(AuthConfig config, String alipayPublicKey) {
method AuthAlipayRequest (line 94) | public AuthAlipayRequest(AuthConfig config, String alipayPublicKey, Au...
method AuthAlipayRequest (line 116) | public AuthAlipayRequest(AuthConfig config, String alipayPublicKey, Au...
method determineAlipayPublicKey (line 124) | private String determineAlipayPublicKey(String alipayPublicKey, AuthCo...
method check (line 128) | protected void check(AuthConfig config) {
method checkCode (line 142) | @Override
method getAccessToken (line 149) | @Override
method refresh (line 177) | @Override
method getUserInfo (line 202) | @Override
method authorize (line 239) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthAliyunRequest.java
class AuthAliyunRequest (line 18) | public class AuthAliyunRequest extends AuthDefaultRequest {
method AuthAliyunRequest (line 20) | public AuthAliyunRequest(AuthConfig config) {
method AuthAliyunRequest (line 24) | public AuthAliyunRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 28) | @Override
method getUserInfo (line 41) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthAmazonRequest.java
class AuthAmazonRequest (line 35) | public class AuthAmazonRequest extends AuthDefaultRequest {
method AuthAmazonRequest (line 37) | public AuthAmazonRequest(AuthConfig config) {
method AuthAmazonRequest (line 41) | public AuthAmazonRequest(AuthConfig config, AuthStateCache authStateCa...
method authorize (line 51) | @Override
method getAccessToken (line 80) | @Override
method refresh (line 97) | @Override
method getToken (line 111) | private AuthToken getToken(Map<String, String> param, String url) {
method checkResponse (line 131) | private void checkResponse(JSONObject jsonObject) {
method getUserInfo (line 143) | @Override
method checkToken (line 167) | private void checkToken(String accessToken) {
method userInfoUrl (line 175) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthAppleRequest.java
class AuthAppleRequest (line 30) | public class AuthAppleRequest extends AuthDefaultRequest {
method AuthAppleRequest (line 36) | public AuthAppleRequest(AuthConfig config) {
method AuthAppleRequest (line 40) | public AuthAppleRequest(AuthConfig config, AuthStateCache authStateCac...
method authorize (line 44) | @Override
method getAccessToken (line 52) | @Override
method getUserInfo (line 78) | @Override
method checkConfig (line 95) | @Override
method getToken (line 117) | private String getToken() {
method getPrivateKey (line 128) | private PrivateKey getPrivateKey() {
class AppleUserInfo (line 145) | @Data
class AppleUsername (line 151) | @Data
FILE: src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java
class AuthBaiduRequest (line 26) | public class AuthBaiduRequest extends AuthDefaultRequest {
method AuthBaiduRequest (line 28) | public AuthBaiduRequest(AuthConfig config) {
method AuthBaiduRequest (line 32) | public AuthBaiduRequest(AuthConfig config, AuthStateCache authStateCac...
method getAccessToken (line 36) | @Override
method getUserInfo (line 50) | @Override
method getAvatar (line 68) | private String getAvatar(JSONObject object) {
method revoke (line 73) | @Override
method refresh (line 83) | @Override
method authorize (line 105) | @Override
method checkResponse (line 118) | private void checkResponse(JSONObject object) {
method getAuthToken (line 125) | private AuthToken getAuthToken(String response) {
FILE: src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java
class AuthCodingRequest (line 22) | public class AuthCodingRequest extends AuthDefaultRequest {
method AuthCodingRequest (line 24) | public AuthCodingRequest(AuthConfig config) {
method AuthCodingRequest (line 28) | public AuthCodingRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 32) | @Override
method getUserInfo (line 44) | @Override
method checkResponse (line 73) | private void checkResponse(JSONObject object) {
method authorize (line 86) | @Override
method accessTokenUrl (line 103) | @Override
method userInfoUrl (line 120) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java
class AuthCsdnRequest (line 19) | @Deprecated
method AuthCsdnRequest (line 22) | public AuthCsdnRequest(AuthConfig config) {
method AuthCsdnRequest (line 26) | public AuthCsdnRequest(AuthConfig config, AuthStateCache authStateCach...
method getAccessToken (line 30) | @Override
method getUserInfo (line 38) | @Override
method checkResponse (line 60) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthDefaultRequest.java
class AuthDefaultRequest (line 26) | public abstract class AuthDefaultRequest implements AuthRequest {
method AuthDefaultRequest (line 31) | public AuthDefaultRequest(AuthConfig config, AuthSource source) {
method AuthDefaultRequest (line 35) | public AuthDefaultRequest(AuthConfig config, AuthSource source, AuthSt...
method login (line 53) | @Override
method checkCode (line 70) | protected void checkCode(AuthCallback authCallback) {
method responseError (line 80) | AuthResponse<AuthUser> responseError(Exception e) {
method authorize (line 102) | @Deprecated
method authorize (line 115) | @Override
method accessTokenUrl (line 131) | protected String accessTokenUrl(String code) {
method refreshTokenUrl (line 147) | protected String refreshTokenUrl(String refreshToken) {
method userInfoUrl (line 163) | protected String userInfoUrl(AuthToken authToken) {
method revokeUrl (line 173) | protected String revokeUrl(AuthToken authToken) {
method getRealState (line 183) | protected String getRealState(String state) {
method doPostAuthorizationCode (line 198) | protected String doPostAuthorizationCode(String code) {
method doGetAuthorizationCode (line 208) | protected String doGetAuthorizationCode(String code) {
method doPostUserInfo (line 218) | @Deprecated
method doGetUserInfo (line 229) | protected String doGetUserInfo(AuthToken authToken) {
method doPostRevoke (line 239) | @Deprecated
method doGetRevoke (line 250) | protected String doGetRevoke(AuthToken authToken) {
method getScopes (line 263) | protected String getScopes(String separator, boolean encode, List<Stri...
method checkConfig (line 279) | protected void checkConfig(AuthConfig config) {
FILE: src/main/java/me/zhyd/oauth/request/AuthDingTalkAccountRequest.java
class AuthDingTalkAccountRequest (line 13) | public class AuthDingTalkAccountRequest extends AbstractAuthDingtalkRequ...
method AuthDingTalkAccountRequest (line 15) | public AuthDingTalkAccountRequest(AuthConfig config) {
method AuthDingTalkAccountRequest (line 19) | public AuthDingTalkAccountRequest(AuthConfig config, AuthStateCache au...
FILE: src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java
class AuthDingTalkRequest (line 13) | public class AuthDingTalkRequest extends AbstractAuthDingtalkRequest {
method AuthDingTalkRequest (line 15) | public AuthDingTalkRequest(AuthConfig config) {
method AuthDingTalkRequest (line 19) | public AuthDingTalkRequest(AuthConfig config, AuthStateCache authState...
FILE: src/main/java/me/zhyd/oauth/request/AuthDingTalkV2Request.java
class AuthDingTalkV2Request (line 26) | public class AuthDingTalkV2Request extends AuthDefaultRequest {
method AuthDingTalkV2Request (line 28) | public AuthDingTalkV2Request(AuthConfig config) {
method AuthDingTalkV2Request (line 32) | public AuthDingTalkV2Request(AuthConfig config, AuthStateCache authSta...
method authorize (line 36) | @Override
method getAccessToken (line 52) | @Override
method getUserInfo (line 72) | @Override
method accessTokenUrl (line 100) | protected String accessTokenUrl(String code) {
FILE: src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
class AuthDouyinRequest (line 26) | public class AuthDouyinRequest extends AuthDefaultRequest {
method AuthDouyinRequest (line 28) | public AuthDouyinRequest(AuthConfig config) {
method AuthDouyinRequest (line 32) | public AuthDouyinRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 36) | @Override
method getUserInfo (line 41) | @Override
method refresh (line 62) | @Override
method checkResponse (line 75) | private void checkResponse(JSONObject object) {
method getToken (line 90) | private AuthToken getToken(String accessTokenUrl) {
method authorize (line 112) | @Override
method accessTokenUrl (line 129) | @Override
method userInfoUrl (line 145) | @Override
method refreshTokenUrl (line 159) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthElemeRequest.java
class AuthElemeRequest (line 33) | public class AuthElemeRequest extends AuthDefaultRequest {
method AuthElemeRequest (line 38) | public AuthElemeRequest(AuthConfig config) {
method AuthElemeRequest (line 42) | public AuthElemeRequest(AuthConfig config, AuthStateCache authStateCac...
method getAccessToken (line 46) | @Override
method getUserInfo (line 68) | @Override
method refresh (line 119) | @Override
method authorize (line 143) | @Override
method getBasic (line 148) | private String getBasic(String appKey, String appSecret) {
method buildHeader (line 155) | private HttpHeader buildHeader(String contentType, String requestId, b...
method getRequestId (line 168) | private String getRequestId() {
method checkResponse (line 172) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java
class AuthFacebookRequest (line 24) | public class AuthFacebookRequest extends AuthDefaultRequest {
method AuthFacebookRequest (line 26) | public AuthFacebookRequest(AuthConfig config) {
method AuthFacebookRequest (line 30) | public AuthFacebookRequest(AuthConfig config, AuthStateCache authState...
method getAccessToken (line 34) | @Override
method getUserInfo (line 46) | @Override
method getUserPicture (line 66) | private String getUserPicture(JSONObject object) {
method userInfoUrl (line 84) | @Override
method checkConfig (line 92) | @Override
method checkResponse (line 107) | private void checkResponse(JSONObject object) {
method authorize (line 119) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java
class AuthFeishuRequest (line 30) | public class AuthFeishuRequest extends AuthDefaultRequest {
method AuthFeishuRequest (line 32) | public AuthFeishuRequest(AuthConfig config) {
method AuthFeishuRequest (line 36) | public AuthFeishuRequest(AuthConfig config, AuthStateCache authStateCa...
method getAppAccessToken (line 48) | private String getAppAccessToken() {
method getAccessToken (line 68) | @Override
method getUserInfo (line 78) | @Override
method refresh (line 100) | @Override
method getToken (line 113) | private AuthToken getToken(JSONObject param, String url) {
method authorize (line 128) | @Override
method checkResponse (line 143) | private void checkResponse(JSONObject jsonObject) {
FILE: src/main/java/me/zhyd/oauth/request/AuthFigmaRequest.java
class AuthFigmaRequest (line 22) | public class AuthFigmaRequest extends AuthDefaultRequest {
method AuthFigmaRequest (line 23) | public AuthFigmaRequest(AuthConfig config) {
method AuthFigmaRequest (line 27) | public AuthFigmaRequest(AuthConfig config, AuthStateCache authStateCac...
method authorize (line 31) | @Override
method getAccessToken (line 38) | @Override
method refresh (line 58) | @Override
method refreshTokenUrl (line 79) | @Override
method getUserInfo (line 88) | @Override
method checkResponse (line 113) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java
class AuthGiteeRequest (line 22) | public class AuthGiteeRequest extends AuthDefaultRequest {
method AuthGiteeRequest (line 24) | public AuthGiteeRequest(AuthConfig config) {
method AuthGiteeRequest (line 28) | public AuthGiteeRequest(AuthConfig config, AuthStateCache authStateCac...
method getAccessToken (line 32) | @Override
method getUserInfo (line 46) | @Override
method checkResponse (line 73) | private void checkResponse(JSONObject object) {
method authorize (line 85) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java
class AuthGithubRequest (line 27) | public class AuthGithubRequest extends AuthDefaultRequest {
method AuthGithubRequest (line 29) | public AuthGithubRequest(AuthConfig config) {
method AuthGithubRequest (line 33) | public AuthGithubRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 37) | @Override
method getUserInfo (line 51) | @Override
method checkResponse (line 77) | private void checkResponse(boolean error, String errorDescription) {
method authorize (line 89) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthGitlabRequest.java
class AuthGitlabRequest (line 22) | public class AuthGitlabRequest extends AuthDefaultRequest {
method AuthGitlabRequest (line 24) | public AuthGitlabRequest(AuthConfig config) {
method AuthGitlabRequest (line 28) | public AuthGitlabRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 32) | @Override
method getUserInfo (line 48) | @Override
method checkResponse (line 72) | private void checkResponse(JSONObject object) {
method authorize (line 90) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java
class AuthGoogleRequest (line 25) | public class AuthGoogleRequest extends AuthDefaultRequest {
method AuthGoogleRequest (line 27) | public AuthGoogleRequest(AuthConfig config) {
method AuthGoogleRequest (line 31) | public AuthGoogleRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 35) | @Override
method getUserInfo (line 49) | @Override
method authorize (line 77) | @Override
method userInfoUrl (line 92) | @Override
method checkResponse (line 102) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthHuaweiRequest.java
class AuthHuaweiRequest (line 32) | @Deprecated
method AuthHuaweiRequest (line 35) | public AuthHuaweiRequest(AuthConfig config) {
method AuthHuaweiRequest (line 39) | public AuthHuaweiRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 51) | @Override
method getUserInfo (line 71) | @Override
method refresh (line 106) | @Override
method getAuthToken (line 118) | private AuthToken getAuthToken(String response) {
method authorize (line 137) | @Override
method userInfoUrl (line 151) | @Override
method getRealGender (line 167) | private AuthUserGender getRealGender(JSONObject object) {
method checkResponse (line 178) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthHuaweiV3Request.java
class AuthHuaweiV3Request (line 33) | public class AuthHuaweiV3Request extends AuthDefaultRequest {
method AuthHuaweiV3Request (line 35) | public AuthHuaweiV3Request(AuthConfig config) {
method AuthHuaweiV3Request (line 39) | public AuthHuaweiV3Request(AuthConfig config, AuthStateCache authState...
method getAccessToken (line 51) | @Override
method getUserInfo (line 79) | @Override
method refresh (line 127) | @Override
method getAuthToken (line 141) | private AuthToken getAuthToken(String response) {
method authorize (line 161) | @Override
method checkResponse (line 186) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthJdRequest.java
class AuthJdRequest (line 31) | public class AuthJdRequest extends AuthDefaultRequest {
method AuthJdRequest (line 33) | public AuthJdRequest(AuthConfig config) {
method AuthJdRequest (line 37) | public AuthJdRequest(AuthConfig config, AuthStateCache authStateCache) {
method getAccessToken (line 41) | @Override
method getUserInfo (line 63) | @Override
method getUserDataJsonObject (line 99) | private JSONObject getUserDataJsonObject(JSONObject object) {
method refresh (line 105) | @Override
method checkResponse (line 129) | private void checkResponse(JSONObject object) {
method authorize (line 135) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthKujialeRequest.java
class AuthKujialeRequest (line 24) | public class AuthKujialeRequest extends AuthDefaultRequest {
method AuthKujialeRequest (line 26) | public AuthKujialeRequest(AuthConfig config) {
method AuthKujialeRequest (line 30) | public AuthKujialeRequest(AuthConfig config, AuthStateCache authStateC...
method authorize (line 42) | @Override
method getAccessToken (line 49) | @Override
method getAuthToken (line 55) | private AuthToken getAuthToken(String response) {
method checkResponse (line 65) | private JSONObject checkResponse(String response) {
method getUserInfo (line 73) | @Override
method getOpenId (line 103) | private String getOpenId(AuthToken authToken) {
method refresh (line 111) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthLineRequest.java
class AuthLineRequest (line 28) | public class AuthLineRequest extends AuthDefaultRequest {
method AuthLineRequest (line 30) | public AuthLineRequest(AuthConfig config) {
method AuthLineRequest (line 34) | public AuthLineRequest(AuthConfig config, AuthStateCache authStateCach...
method getAccessToken (line 38) | @Override
method getUserInfo (line 58) | @Override
method revoke (line 77) | @Override
method refresh (line 90) | @Override
method userInfoUrl (line 112) | @Override
method authorize (line 119) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java
class AuthLinkedinRequest (line 28) | public class AuthLinkedinRequest extends AuthDefaultRequest {
method AuthLinkedinRequest (line 30) | public AuthLinkedinRequest(AuthConfig config) {
method AuthLinkedinRequest (line 34) | public AuthLinkedinRequest(AuthConfig config, AuthStateCache authState...
method getAccessToken (line 38) | @Override
method getUserInfo (line 43) | @Override
method getUserName (line 82) | private String getUserName(JSONObject userInfoObject) {
method getAvatar (line 105) | private String getAvatar(JSONObject userInfoObject) {
method getUserEmail (line 135) | private String getUserEmail(String accessToken) {
method getUserName (line 152) | private String getUserName(JSONObject userInfoObject, String nameKey) {
method checkResponse (line 166) | private void checkResponse(JSONObject object) {
method getToken (line 178) | private AuthToken getToken(String accessTokenUrl) {
method authorize (line 202) | @Override
method userInfoUrl (line 215) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthMeituanRequest.java
class AuthMeituanRequest (line 26) | public class AuthMeituanRequest extends AuthDefaultRequest {
method AuthMeituanRequest (line 28) | public AuthMeituanRequest(AuthConfig config) {
method AuthMeituanRequest (line 32) | public AuthMeituanRequest(AuthConfig config, AuthStateCache authStateC...
method getAccessToken (line 36) | @Override
method getUserInfo (line 56) | @Override
method refresh (line 80) | @Override
method checkResponse (line 103) | private void checkResponse(JSONObject object) {
method authorize (line 109) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthMiRequest.java
class AuthMiRequest (line 29) | public class AuthMiRequest extends AuthDefaultRequest {
method AuthMiRequest (line 32) | public AuthMiRequest(AuthConfig config) {
method AuthMiRequest (line 36) | public AuthMiRequest(AuthConfig config, AuthStateCache authStateCache) {
method getAccessToken (line 40) | @Override
method getToken (line 45) | private AuthToken getToken(String accessTokenUrl) {
method getUserInfo (line 66) | @Override
method refresh (line 112) | @Override
method authorize (line 127) | @Override
method userInfoUrl (line 141) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthMicrosoftCnRequest.java
class AuthMicrosoftCnRequest (line 16) | public class AuthMicrosoftCnRequest extends AbstractAuthMicrosoftRequest {
method AuthMicrosoftCnRequest (line 18) | public AuthMicrosoftCnRequest(AuthConfig config) {
method AuthMicrosoftCnRequest (line 22) | public AuthMicrosoftCnRequest(AuthConfig config, AuthStateCache authSt...
method checkConfig (line 26) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java
class AuthMicrosoftRequest (line 17) | public class AuthMicrosoftRequest extends AbstractAuthMicrosoftRequest {
method AuthMicrosoftRequest (line 19) | public AuthMicrosoftRequest(AuthConfig config) {
method AuthMicrosoftRequest (line 23) | public AuthMicrosoftRequest(AuthConfig config, AuthStateCache authStat...
method checkConfig (line 27) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthOktaRequest.java
class AuthOktaRequest (line 32) | public class AuthOktaRequest extends AuthDefaultRequest {
method AuthOktaRequest (line 34) | public AuthOktaRequest(AuthConfig config) {
method AuthOktaRequest (line 38) | public AuthOktaRequest(AuthConfig config, AuthStateCache authStateCach...
method getAccessToken (line 42) | @Override
method getAuthToken (line 48) | private AuthToken getAuthToken(String tokenUrl) {
method refresh (line 66) | @Override
method getUserInfo (line 81) | @Override
method revoke (line 102) | @Override
method checkResponse (line 115) | private void checkResponse(JSONObject object) {
method authorize (line 121) | @Override
method accessTokenUrl (line 133) | @Override
method refreshTokenUrl (line 142) | @Override
method revokeUrl (line 150) | @Override
method userInfoUrl (line 155) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java
class AuthOschinaRequest (line 20) | public class AuthOschinaRequest extends AuthDefaultRequest {
method AuthOschinaRequest (line 22) | public AuthOschinaRequest(AuthConfig config) {
method AuthOschinaRequest (line 26) | public AuthOschinaRequest(AuthConfig config, AuthStateCache authStateC...
method getAccessToken (line 30) | @Override
method getUserInfo (line 43) | @Override
method accessTokenUrl (line 69) | @Override
method userInfoUrl (line 87) | @Override
method checkResponse (line 100) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthPinterestRequest.java
class AuthPinterestRequest (line 26) | public class AuthPinterestRequest extends AuthDefaultRequest {
method AuthPinterestRequest (line 30) | public AuthPinterestRequest(AuthConfig config) {
method AuthPinterestRequest (line 34) | public AuthPinterestRequest(AuthConfig config, AuthStateCache authStat...
method getAccessToken (line 38) | @Override
method getUserInfo (line 49) | @Override
method getAvatarUrl (line 70) | private String getAvatarUrl(JSONObject userObj) {
method authorize (line 86) | @Override
method userInfoUrl (line 99) | @Override
method checkResponse (line 112) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthProginnRequest.java
class AuthProginnRequest (line 26) | public class AuthProginnRequest extends AuthDefaultRequest {
method AuthProginnRequest (line 28) | public AuthProginnRequest(AuthConfig config) {
method AuthProginnRequest (line 32) | public AuthProginnRequest(AuthConfig config, AuthStateCache authStateC...
method getAccessToken (line 36) | @Override
method getUserInfo (line 56) | @Override
method checkResponse (line 79) | private void checkResponse(JSONObject object) {
method authorize (line 91) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthQQMiniProgramRequest.java
class AuthQQMiniProgramRequest (line 24) | public class AuthQQMiniProgramRequest extends AuthDefaultRequest {
method AuthQQMiniProgramRequest (line 25) | public AuthQQMiniProgramRequest(AuthConfig config) {
method AuthQQMiniProgramRequest (line 29) | public AuthQQMiniProgramRequest(AuthConfig config, AuthStateCache auth...
method getAccessToken (line 33) | @Override
method getUserInfo (line 49) | @Override
method checkResponse (line 68) | private void checkResponse(JSCode2SessionResponse response) {
method accessTokenUrl (line 74) | @Override
class JSCode2SessionResponse (line 84) | @Data
FILE: src/main/java/me/zhyd/oauth/request/AuthQqRequest.java
class AuthQqRequest (line 26) | public class AuthQqRequest extends AuthDefaultRequest {
method AuthQqRequest (line 27) | public AuthQqRequest(AuthConfig config) {
method AuthQqRequest (line 31) | public AuthQqRequest(AuthConfig config, AuthStateCache authStateCache) {
method getAccessToken (line 35) | @Override
method refresh (line 41) | @Override
method getUserInfo (line 47) | @Override
method getOpenId (line 81) | private String getOpenId(AuthToken authToken) {
method userInfoUrl (line 106) | @Override
method getAuthToken (line 115) | private AuthToken getAuthToken(String response) {
method authorize (line 127) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java
class AuthRenrenRequest (line 30) | public class AuthRenrenRequest extends AuthDefaultRequest {
method AuthRenrenRequest (line 32) | public AuthRenrenRequest(AuthConfig config) {
method AuthRenrenRequest (line 36) | public AuthRenrenRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 40) | @Override
method getUserInfo (line 45) | @Override
method refresh (line 62) | @Override
method getToken (line 70) | private AuthToken getToken(String url) {
method getAvatarUrl (line 86) | private String getAvatarUrl(JSONObject userObj) {
method getGender (line 94) | private AuthUserGender getGender(JSONObject userObj) {
method getCompany (line 102) | private String getCompany(JSONObject userObj) {
method userInfoUrl (line 116) | @Override
method authorize (line 124) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthRequest.java
type AuthRequest (line 22) | public interface AuthRequest {
method authorize (line 32) | @Deprecated
method authorize (line 43) | default String authorize(String state) {
method getAccessToken (line 55) | AuthToken getAccessToken(AuthCallback authCallback);
method getUserInfo (line 64) | AuthUser getUserInfo(AuthToken authToken);
method login (line 72) | default AuthResponse<AuthUser> login(AuthCallback authCallback) {
method revoke (line 82) | default AuthResponse revoke(AuthToken authToken) {
method refresh (line 92) | default AuthResponse<AuthToken> refresh(AuthToken authToken) {
FILE: src/main/java/me/zhyd/oauth/request/AuthSlackRequest.java
class AuthSlackRequest (line 27) | public class AuthSlackRequest extends AuthDefaultRequest {
method AuthSlackRequest (line 29) | public AuthSlackRequest(AuthConfig config) {
method AuthSlackRequest (line 33) | public AuthSlackRequest(AuthConfig config, AuthStateCache authStateCac...
method getAccessToken (line 37) | @Override
method getUserInfo (line 53) | @Override
method revoke (line 77) | @Override
method checkResponse (line 96) | private void checkResponse(JSONObject object) {
method userInfoUrl (line 110) | @Override
method authorize (line 123) | @Override
method accessTokenUrl (line 133) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthStackOverflowRequest.java
class AuthStackOverflowRequest (line 29) | public class AuthStackOverflowRequest extends AuthDefaultRequest {
method AuthStackOverflowRequest (line 31) | public AuthStackOverflowRequest(AuthConfig config) {
method AuthStackOverflowRequest (line 35) | public AuthStackOverflowRequest(AuthConfig config, AuthStateCache auth...
method getAccessToken (line 39) | @Override
method getUserInfo (line 56) | @Override
method authorize (line 88) | @Override
method checkResponse (line 100) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java
class AuthTaobaoRequest (line 25) | public class AuthTaobaoRequest extends AuthDefaultRequest {
method AuthTaobaoRequest (line 27) | public AuthTaobaoRequest(AuthConfig config) {
method AuthTaobaoRequest (line 31) | public AuthTaobaoRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 35) | @Override
method getAuthToken (line 40) | private AuthToken getAuthToken(JSONObject object) {
method checkResponse (line 54) | private void checkResponse(JSONObject object) {
method getUserInfo (line 60) | @Override
method refresh (line 81) | @Override
method authorize (line 99) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java
class AuthTeambitionRequest (line 26) | public class AuthTeambitionRequest extends AuthDefaultRequest {
method AuthTeambitionRequest (line 28) | public AuthTeambitionRequest(AuthConfig config) {
method AuthTeambitionRequest (line 32) | public AuthTeambitionRequest(AuthConfig config, AuthStateCache authSta...
method getAccessToken (line 40) | @Override
method getUserInfo (line 59) | @Override
method refresh (line 89) | @Override
method checkResponse (line 116) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java
class AuthToutiaoRequest (line 21) | public class AuthToutiaoRequest extends AuthDefaultRequest {
method AuthToutiaoRequest (line 23) | public AuthToutiaoRequest(AuthConfig config) {
method AuthToutiaoRequest (line 27) | public AuthToutiaoRequest(AuthConfig config, AuthStateCache authStateC...
method getAccessToken (line 31) | @Override
method getUserInfo (line 45) | @Override
method authorize (line 78) | @Override
method accessTokenUrl (line 96) | @Override
method userInfoUrl (line 112) | @Override
method checkResponse (line 125) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/request/AuthTwitterRequest.java
class AuthTwitterRequest (line 29) | public class AuthTwitterRequest extends AuthDefaultRequest {
method AuthTwitterRequest (line 33) | public AuthTwitterRequest(AuthConfig config) {
method AuthTwitterRequest (line 37) | public AuthTwitterRequest(AuthConfig config, AuthStateCache authStateC...
method authorize (line 48) | @Override
method getRequestToken (line 62) | public AuthToken getRequestToken() {
method getAccessToken (line 90) | @Override
method getUserInfo (line 117) | @Override
method userInfoUrl (line 153) | @Override
method buildOauthParams (line 161) | private Map<String, String> buildOauthParams() {
method buildHeader (line 171) | private String buildHeader(Map<String, String> oauthParams) {
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseQrcodeRequest.java
class AuthWeChatEnterpriseQrcodeRequest (line 18) | public class AuthWeChatEnterpriseQrcodeRequest extends AbstractAuthWeCha...
method AuthWeChatEnterpriseQrcodeRequest (line 19) | public AuthWeChatEnterpriseQrcodeRequest(AuthConfig config) {
method AuthWeChatEnterpriseQrcodeRequest (line 23) | public AuthWeChatEnterpriseQrcodeRequest(AuthConfig config, AuthStateC...
method authorize (line 27) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseQrcodeV2Request.java
class AuthWeChatEnterpriseQrcodeV2Request (line 20) | public class AuthWeChatEnterpriseQrcodeV2Request extends AbstractAuthWeC...
method AuthWeChatEnterpriseQrcodeV2Request (line 21) | public AuthWeChatEnterpriseQrcodeV2Request(AuthConfig config) {
method AuthWeChatEnterpriseQrcodeV2Request (line 25) | public AuthWeChatEnterpriseQrcodeV2Request(AuthConfig config, AuthStat...
method authorize (line 29) | @Override
method checkConfig (line 44) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseThirdQrcodeRequest.java
class AuthWeChatEnterpriseThirdQrcodeRequest (line 24) | public class AuthWeChatEnterpriseThirdQrcodeRequest extends AbstractAuth...
method AuthWeChatEnterpriseThirdQrcodeRequest (line 25) | public AuthWeChatEnterpriseThirdQrcodeRequest(AuthConfig config) {
method AuthWeChatEnterpriseThirdQrcodeRequest (line 29) | public AuthWeChatEnterpriseThirdQrcodeRequest(AuthConfig config, AuthS...
method authorize (line 33) | @Override
method login (line 43) | @Override
method getAccessToken (line 58) | @Override
method doGetAuthorizationCode (line 74) | @Override
method accessTokenUrl (line 87) | protected String accessTokenUrl() {
method getUserInfo (line 92) | @Override
method doGetUserInfo (line 100) | @Override
method userInfoUrl (line 108) | @Override
method checkResponse (line 115) | private JSONObject checkResponse(String response) {
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseWebRequest.java
class AuthWeChatEnterpriseWebRequest (line 19) | public class AuthWeChatEnterpriseWebRequest extends AbstractAuthWeChatEn...
method AuthWeChatEnterpriseWebRequest (line 20) | public AuthWeChatEnterpriseWebRequest(AuthConfig config) {
method AuthWeChatEnterpriseWebRequest (line 24) | public AuthWeChatEnterpriseWebRequest(AuthConfig config, AuthStateCach...
method authorize (line 28) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatMpRequest.java
class AuthWeChatMpRequest (line 23) | public class AuthWeChatMpRequest extends AuthDefaultRequest {
method AuthWeChatMpRequest (line 24) | public AuthWeChatMpRequest(AuthConfig config) {
method AuthWeChatMpRequest (line 28) | public AuthWeChatMpRequest(AuthConfig config, AuthStateCache authState...
method getAccessToken (line 38) | @Override
method getUserInfo (line 43) | @Override
method refresh (line 81) | @Override
method checkResponse (line 94) | private void checkResponse(JSONObject object) {
method getToken (line 106) | private AuthToken getToken(String accessTokenUrl) {
method authorize (line 129) | @Override
method accessTokenUrl (line 146) | @Override
method userInfoUrl (line 162) | @Override
method refreshTokenUrl (line 177) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthWeChatOpenRequest.java
class AuthWeChatOpenRequest (line 23) | public class AuthWeChatOpenRequest extends AuthDefaultRequest {
method AuthWeChatOpenRequest (line 24) | public AuthWeChatOpenRequest(AuthConfig config) {
method AuthWeChatOpenRequest (line 28) | public AuthWeChatOpenRequest(AuthConfig config, AuthStateCache authSta...
method getAccessToken (line 38) | @Override
method getUserInfo (line 43) | @Override
method refresh (line 71) | @Override
method checkResponse (line 84) | private void checkResponse(JSONObject object) {
method getToken (line 96) | private AuthToken getToken(String accessTokenUrl) {
method authorize (line 117) | @Override
method accessTokenUrl (line 134) | @Override
method userInfoUrl (line 150) | @Override
method refreshTokenUrl (line 165) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthWechatMiniProgramRequest.java
class AuthWechatMiniProgramRequest (line 24) | public class AuthWechatMiniProgramRequest extends AuthDefaultRequest {
method AuthWechatMiniProgramRequest (line 25) | public AuthWechatMiniProgramRequest(AuthConfig config) {
method AuthWechatMiniProgramRequest (line 29) | public AuthWechatMiniProgramRequest(AuthConfig config, AuthStateCache ...
method getAccessToken (line 33) | @Override
method getUserInfo (line 49) | @Override
method checkResponse (line 68) | private void checkResponse(JSCode2SessionResponse response) {
method accessTokenUrl (line 74) | @Override
class JSCode2SessionResponse (line 84) | @Data
FILE: src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java
class AuthWeiboRequest (line 25) | public class AuthWeiboRequest extends AuthDefaultRequest {
method AuthWeiboRequest (line 27) | public AuthWeiboRequest(AuthConfig config) {
method AuthWeiboRequest (line 31) | public AuthWeiboRequest(AuthConfig config, AuthStateCache authStateCac...
method getAccessToken (line 35) | @Override
method getUserInfo (line 50) | @Override
method userInfoUrl (line 87) | @Override
method authorize (line 95) | @Override
method revoke (line 102) | @Override
FILE: src/main/java/me/zhyd/oauth/request/AuthXmlyRequest.java
class AuthXmlyRequest (line 27) | public class AuthXmlyRequest extends AuthDefaultRequest {
method AuthXmlyRequest (line 29) | public AuthXmlyRequest(AuthConfig config) {
method AuthXmlyRequest (line 33) | public AuthXmlyRequest(AuthConfig config, AuthStateCache authStateCach...
method getAccessToken (line 44) | @Override
method authorize (line 72) | @Override
method getUserInfo (line 91) | @Override
method checkResponse (line 119) | private void checkResponse(JSONObject object) {
FILE: src/main/java/me/zhyd/oauth/utils/AuthChecker.java
class AuthChecker (line 17) | public class AuthChecker {
method isSupportedAuth (line 27) | public static boolean isSupportedAuth(AuthConfig config, AuthSource so...
method checkConfig (line 55) | public static void checkConfig(AuthConfig config, AuthSource source) {
method checkCode (line 77) | public static void checkCode(AuthSource source, AuthCallback callback) {
method checkState (line 102) | public static void checkState(String state, AuthSource source, AuthSta...
FILE: src/main/java/me/zhyd/oauth/utils/AuthScopeUtils.java
class AuthScopeUtils (line 16) | public class AuthScopeUtils {
method getDefaultScopes (line 24) | public static List<String> getDefaultScopes(AuthScope[] scopes) {
method getScopes (line 40) | public static List<String> getScopes(AuthScope... scopes) {
FILE: src/main/java/me/zhyd/oauth/utils/AuthStateUtils.java
class AuthStateUtils (line 9) | public class AuthStateUtils {
method createState (line 16) | public static String createState() {
FILE: src/main/java/me/zhyd/oauth/utils/Base64Utils.java
class Base64Utils (line 12) | public class Base64Utils {
method encode (line 51) | public static byte[] encode(byte[] arr, boolean lineSep) {
method encodeUrlSafe (line 63) | public static byte[] encodeUrlSafe(byte[] arr, boolean lineSep) {
method encode (line 73) | public static String encode(CharSequence source) {
method encodeUrlSafe (line 84) | public static String encodeUrlSafe(CharSequence source) {
method encode (line 95) | public static String encode(CharSequence source, Charset charset) {
method encodeUrlSafe (line 107) | public static String encodeUrlSafe(CharSequence source, Charset charse...
method encode (line 117) | public static String encode(byte[] source) {
method encodeUrlSafe (line 128) | public static String encodeUrlSafe(byte[] source) {
method encode (line 141) | public static byte[] encode(byte[] arr, boolean isMultiLine, boolean i...
FILE: src/main/java/me/zhyd/oauth/utils/GlobalAuthUtils.java
class GlobalAuthUtils (line 24) | public class GlobalAuthUtils {
method generateDingTalkSignature (line 36) | public static String generateDingTalkSignature(String secretKey, Strin...
method sign (line 49) | private static byte[] sign(byte[] key, byte[] data, String algorithm) {
method urlEncode (line 67) | public static String urlEncode(String value) {
method urlDecode (line 86) | public static String urlDecode(String value) {
method parseStringToMap (line 103) | public static Map<String, String> parseStringToMap(String accessTokenS...
method parseMapToString (line 127) | public static String parseMapToString(Map<String, String> params, bool...
method isHttpProtocol (line 148) | public static boolean isHttpProtocol(String url) {
method isHttpsProtocol (line 161) | public static boolean isHttpsProtocol(String url) {
method isLocalHost (line 174) | public static boolean isLocalHost(String url) {
method isHttpsProtocolOrLocalHost (line 184) | public static boolean isHttpsProtocolOrLocalHost(String url) {
method generateNonce (line 198) | public static String generateNonce(int len) {
method getTimestamp (line 214) | public static String getTimestamp() {
method generateTwitterSignature (line 229) | public static String generateTwitterSignature(Map<String, String> para...
method generateXmlySignature (line 248) | public static String generateXmlySignature(Map<String, String> params,...
method generateElemeSignature (line 280) | public static String generateElemeSignature(String appKey, String secr...
method md5 (line 301) | public static String md5(String str) {
method generateJdSignature (line 333) | public static String generateJdSignature(String appSecret, Map<String,...
FILE: src/main/java/me/zhyd/oauth/utils/HttpUtils.java
class HttpUtils (line 18) | public class HttpUtils {
method HttpUtils (line 22) | public HttpUtils(HttpConfig config) {
method HttpUtils (line 26) | public HttpUtils() {
method get (line 36) | public HttpUtils get(String url) {
method get (line 50) | public HttpUtils get(String url, Map<String, String> params, HttpHeade...
method post (line 61) | public HttpUtils post(String url) {
method post (line 73) | public HttpUtils post(String url, String data) {
method post (line 86) | public HttpUtils post(String url, String data, HttpHeader header) {
method post (line 99) | public HttpUtils post(String url, Map<String, String> params, boolean ...
method post (line 113) | public HttpUtils post(String url, Map<String, String> params, HttpHead...
method check (line 118) | private HttpUtils check() {
method getBody (line 128) | public String getBody() {
method getHttpResponse (line 132) | public SimpleHttpResponse getHttpResponse() {
FILE: src/main/java/me/zhyd/oauth/utils/IpUtils.java
class IpUtils (line 12) | public class IpUtils {
method getLocalIp (line 19) | public static String getLocalIp() {
FILE: src/main/java/me/zhyd/oauth/utils/PkceUtil.java
class PkceUtil (line 12) | public class PkceUtil {
method generateCodeVerifier (line 14) | public static String generateCodeVerifier() {
method generateCodeChallenge (line 26) | public static String generateCodeChallenge(String codeChallengeMethod,...
method newStringUsAscii (line 36) | public static String newStringUsAscii(byte[] bytes) {
FILE: src/main/java/me/zhyd/oauth/utils/RandomUtil.java
class RandomUtil (line 12) | public class RandomUtil {
method randomString (line 25) | public static String randomString(int length) {
FILE: src/main/java/me/zhyd/oauth/utils/Sha256.java
class Sha256 (line 14) | public class Sha256 {
method digest (line 16) | public static byte[] digest(String str) {
FILE: src/main/java/me/zhyd/oauth/utils/StringUtils.java
class StringUtils (line 9) | public class StringUtils {
method isEmpty (line 11) | public static boolean isEmpty(String str) {
method isNotEmpty (line 15) | public static boolean isNotEmpty(String str) {
method appendIfNotContain (line 28) | public static String appendIfNotContain(String str, String appendStr, ...
method bytes (line 45) | public static byte[] bytes(CharSequence str, Charset charset) {
method str (line 63) | public static String str(byte[] data, Charset charset) {
FILE: src/main/java/me/zhyd/oauth/utils/UrlBuilder.java
class UrlBuilder (line 19) | @Setter
method UrlBuilder (line 25) | private UrlBuilder() {
method fromBaseUrl (line 33) | public static UrlBuilder fromBaseUrl(String baseUrl) {
method getReadOnlyParams (line 45) | public Map<String, Object> getReadOnlyParams() {
method queryParam (line 56) | public UrlBuilder queryParam(String key, Object value) {
method build (line 71) | public String build() {
method build (line 81) | public String build(boolean encode) {
FILE: src/main/java/me/zhyd/oauth/utils/UuidUtils.java
class UuidUtils (line 12) | public class UuidUtils {
method getUUID (line 40) | public static String getUUID() {
method formatUnsignedLong (line 56) | private static void formatUnsignedLong(long val, byte[] buf, int offse...
FILE: src/test/java/me/zhyd/oauth/AuthRequestBuilderTest.java
class AuthRequestBuilderTest (line 11) | public class AuthRequestBuilderTest {
method build2 (line 16) | @Test
method build (line 33) | @Test
method build3 (line 54) | @Test
method build4 (line 73) | @Test
FILE: src/test/java/me/zhyd/oauth/cache/AuthStateCacheTest.java
class AuthStateCacheTest (line 8) | public class AuthStateCacheTest {
method cache1 (line 10) | @Test
method cache2 (line 19) | @Test
FILE: src/test/java/me/zhyd/oauth/config/AuthExtendSource.java
type AuthExtendSource (line 13) | public enum AuthExtendSource implements AuthSource {
method authorize (line 21) | @Override
method accessToken (line 31) | @Override
method userInfo (line 41) | @Override
method revoke (line 51) | @Override
method refresh (line 61) | @Override
method getTargetClass (line 66) | @Override
FILE: src/test/java/me/zhyd/oauth/log/LogTest.java
class LogTest (line 11) | public class LogTest {
method main (line 13) | public static void main(String[] args) {
method testByThread (line 45) | @Test
method testByThrowable (line 62) | @Test
method testBySecurityManager (line 73) | @Test
method callMethodByThread (line 84) | private String callMethodByThread() {
method callMethodByThrowable (line 92) | private String callMethodByThrowable() {
method callMethodBySecurityManager (line 100) | private String callMethodBySecurityManager() {
FILE: src/test/java/me/zhyd/oauth/model/AuthUserTest.java
class AuthUserTest (line 10) | public class AuthUserTest {
method serialize (line 12) | @Test
method deserialize (line 23) | @Test
method source (line 34) | @Test
FILE: src/test/java/me/zhyd/oauth/request/AuthExtendRequest.java
class AuthExtendRequest (line 20) | public class AuthExtendRequest extends AuthDefaultRequest {
method AuthExtendRequest (line 22) | public AuthExtendRequest(AuthConfig config) {
method AuthExtendRequest (line 26) | public AuthExtendRequest(AuthConfig config, AuthStateCache authStateCa...
method getAccessToken (line 38) | @Override
method getUserInfo (line 58) | @Override
method revoke (line 75) | @Override
method refresh (line 89) | @Override
FILE: src/test/java/me/zhyd/oauth/request/AuthExtendRequestTest.java
class AuthExtendRequestTest (line 20) | public class AuthExtendRequestTest {
method authorize (line 22) | @Test
method login (line 34) | @Test
method revoke (line 56) | @Test
method refresh (line 69) | @Test
FILE: src/test/java/me/zhyd/oauth/request/AuthWeChatEnterpriseWebRequestTest.java
class AuthWeChatEnterpriseWebRequestTest (line 9) | public class AuthWeChatEnterpriseWebRequestTest {
method authorize (line 11) | @Test
FILE: src/test/java/me/zhyd/oauth/request/AuthWeChatMpRequestTest.java
class AuthWeChatMpRequestTest (line 7) | public class AuthWeChatMpRequestTest {
method authorize (line 9) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/GlobalAuthUtilsTest.java
class GlobalAuthUtilsTest (line 18) | public class GlobalAuthUtilsTest {
method generateDingTalkSignature (line 20) | @Test
method urlDecode (line 25) | @Test
method parseStringToMap (line 32) | @Test
method isHttpProtocol (line 39) | @Test
method isHttpsProtocol (line 47) | @Test
method isLocalHost (line 55) | @Test
method testGenerateTwitterSignatureForRequestToken (line 64) | @Test
method testGenerateTwitterSignatureForAccessToken (line 88) | @Test
method testGenerateTwitterSignatureForUserInfo (line 116) | @Test
method md5 (line 151) | @Test
method treemap (line 158) | @Test
method urlEncode (line 169) | @Test
method parseMapToString (line 176) | @Test
method generateNonce (line 187) | @Test
method getTimestamp (line 192) | @Test
method generateTwitterSignature (line 197) | @Test
method generateElemeSignature (line 206) | @Test
method generateJdSignature (line 221) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/JsonPathTest.java
class JsonPathTest (line 19) | public class JsonPathTest {
method jsonPath (line 21) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/ScopeTest.java
class ScopeTest (line 16) | public class ScopeTest {
method googleScope (line 18) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/StringUtilsTest.java
class StringUtilsTest (line 8) | public class StringUtilsTest {
method isEmptyNonEmptyInput (line 13) | @Test
method isEmptyEmptyInput (line 18) | @Test
method isEmptyInputNull (line 23) | @Test
method isNotEmptyNonEmptyInput (line 28) | @Test
method isNotEmptyEmptyInput (line 33) | @Test
method isNotEmptyInputNull (line 38) | @Test
method appendIfNotContainAppendedStringNotPresent (line 43) | @Test
method appendIfNotContainAppendedStringPresent (line 56) | @Test
method appendIfNotContainEmptyString (line 69) | @Test
method appendIfNotContainAppendingEmptyString (line 82) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/UrlBuilderTest.java
class UrlBuilderTest (line 17) | public class UrlBuilderTest {
method testUrlBuilder (line 18) | @Test
method build (line 38) | @Test
method build1 (line 51) | @Test
FILE: src/test/java/me/zhyd/oauth/utils/UuidUtilsTest.java
class UuidUtilsTest (line 5) | public class UuidUtilsTest {
method getUUID (line 7) | @Test
Condensed preview — 176 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (671K chars).
[
{
"path": ".editorconfig",
"chars": 292,
"preview": "# JustAuth 开发组IDE 编辑器标准\nroot = true\n\n# 空格替代Tab缩进在各种编辑工具下效果一致\n[*]\nindent_style = space\nindent_size = 2\ncharset = utf-8\nen"
},
{
"path": ".gitee/ISSUE_TEMPLATE.zh-CN.md",
"chars": 139,
"preview": "为更快的帮您定位问题,推荐您用以下模板反馈问题:\n\n### 1. 出现问题时,您做了哪些操作?\n\n### 2. 在哪个步骤出现了问题?\n\n### 3. 您希望得到什么结果?\n\n### 4. 您实际得到什么结果?\n\n### 5. 请附上您出现"
},
{
"path": ".gitee/PULL_REQUEST_TEMPLATE.zh-CN.md",
"chars": 444,
"preview": "- [ ] 是否为解决Issue?\n\n\n### 您做了哪些更新?\n\n- 新增\n\n- 修改\n\n- 修复\n\n- 其他\n\n\n### 是否做了充分测试?\n\n- [ ] 是,已经做过测试,并且测试通过\n- [ ] 否,还没做测试,需要作者自测\n\n注:"
},
{
"path": ".github/FUNDING.yml",
"chars": 680,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 726,
"preview": "---\nname: Bug report template\nabout: Please use this template for reporting suspected bugs.\ntitle: 'bug:'\nlabels: 'bug'\n"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 209,
"preview": "---\nname: Feature Request\nabout: Please use this template for describing new features.\ntitle: 'feat: '\nlabels: 'Feature "
},
{
"path": ".github/ISSUE_TEMPLATE/request-help.md",
"chars": 221,
"preview": "---\nname: Request help template\nabout: Please use this template for requesting help.\ntitle: 'request help:'\nlabels: 'que"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 307,
"preview": "## What this PR does / why we need it:\n\n\n## Pre-submission checklist:\n- [ ] Did you explain what problem does this PR so"
},
{
"path": ".github/workflows/deploy-snapshot.yml",
"chars": 2001,
"preview": "name: Deploy\n\non: \n push:\n branches: [ dev ]\n paths:\n - src/**\n - pom.xml\n\njobs:\n test:\n runs-on: u"
},
{
"path": ".github/workflows/test-pr.yml",
"chars": 583,
"preview": "name: test pull_request\n\non: \n pull_request:\n paths:\n - src/**\n - pom.xml\n\njobs:\n test:\n runs-on: ubun"
},
{
"path": ".gitignore",
"chars": 407,
"preview": "# Compiled class file\n*.class\n\n# Log file\n*.log\n\n# BlueJ files\n*.ctxt\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Packa"
},
{
"path": ".travis.yml",
"chars": 355,
"preview": "language: java\n\nsudo: false # faster builds\n\ninstall: true\n\njdk:\n - openjdk8\n\nnotifications:\n email: false\n\nscript:\n "
},
{
"path": "CHANGELOGS.md",
"chars": 19136,
"preview": "## 1.16.7\n\n### 2024/12/14\n\n- 新增\n - 添加`微信小程序`登录能力,对接文档:[点击查看](https://justauth.cn/guide/oauth/wechat_mini_program/)。\n -"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3358,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
},
{
"path": "LICENSE",
"chars": 1095,
"preview": "MIT License\n\nCopyright (c) 2019 https://gitee.com/yadong.zhang/JustAuth\n\nPermission is hereby granted, free of charge, t"
},
{
"path": "README.en-US.md",
"chars": 6646,
"preview": "<p align=\"center\">\n\t<a href=\"https://www.justauth.cn\"><img src=\"https://gitee.com/yadong.zhang/static/raw/master/JustAut"
},
{
"path": "README.md",
"chars": 8746,
"preview": "<p align=\"center\">\n\t<a href=\"https://www.justauth.cn\"><img src=\"https://gitee.com/yadong.zhang/static/raw/master/JustAut"
},
{
"path": "bin/pull-dev.sh",
"chars": 43,
"preview": "git pull origin dev && git pull github dev\n"
},
{
"path": "bin/pull.sh",
"chars": 49,
"preview": "git pull origin master && git pull github master\n"
},
{
"path": "bin/push-dev.sh",
"chars": 43,
"preview": "git push origin dev && git push github dev\n"
},
{
"path": "bin/push.sh",
"chars": 49,
"preview": "git push origin master && git push github master\n"
},
{
"path": "bin/repVersion.sh",
"chars": 761,
"preview": "#!/bin/bash\n\n#-----------------------------------------------------------\n# 参考自 hutool 工具\n# 此脚本用于每次升级justauth时替换相应位置的版本号"
},
{
"path": "bin/updVersion.sh",
"chars": 370,
"preview": "#!/bin/bash\n\n#------------------------------------------------\n# 参考自 hutool 工具\n# 升级justauth版本,包括:\n# 1. 升级pom.xml中的版本号\n# "
},
{
"path": "bin/version.txt",
"chars": 7,
"preview": "1.16.7\n"
},
{
"path": "docs/.nojekyll",
"chars": 0,
"preview": ""
},
{
"path": "docs/index.html",
"chars": 814,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta name=\"google-site-verification\" content=\"DJSx-fAGWci-EWueWy2_RfafHJX1iv5"
},
{
"path": "example.md",
"chars": 2601,
"preview": "## 各平台授权页面示例\n\n_注:非全部平台,部分平台可能不存在图例_\n\n#### 授权gitee\n\n{\n echo \"--------------------------------------------------------------------------\""
},
{
"path": "pom.xml",
"chars": 10366,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://mav"
},
{
"path": "src/main/java/me/zhyd/oauth/AuthRequestBuilder.java",
"chars": 3392,
"preview": "package me.zhyd.oauth;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhy"
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthCache.java",
"chars": 842,
"preview": "package me.zhyd.oauth.cache;\n\n/**\n * JustAuth缓存,用来缓存State\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n * @"
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthCacheConfig.java",
"chars": 499,
"preview": "package me.zhyd.oauth.cache;\n\n/**\n * AuthCache配置类\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n * @since 1."
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthCacheScheduler.java",
"chars": 1044,
"preview": "package me.zhyd.oauth.cache;\n\nimport java.util.concurrent.ScheduledExecutorService;\nimport java.util.concurrent.Schedule"
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthDefaultCache.java",
"chars": 3352,
"preview": "package me.zhyd.oauth.cache;\n\nimport lombok.Getter;\nimport lombok.Setter;\n\nimport java.io.Serializable;\nimport java.util"
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthDefaultStateCache.java",
"chars": 1223,
"preview": "package me.zhyd.oauth.cache;\n\n/**\n * 默认的state缓存实现\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n * @since 1."
},
{
"path": "src/main/java/me/zhyd/oauth/cache/AuthStateCache.java",
"chars": 755,
"preview": "package me.zhyd.oauth.cache;\n\n/**\n * <p>\n * State缓存接口,方便用户扩展\n * </p>\n *\n * @author yangkai.shen\n * @since 1.10.0\n */\npub"
},
{
"path": "src/main/java/me/zhyd/oauth/cache/package-info.java",
"chars": 164,
"preview": "/**\n * JustAuth 缓存实现, 提供基础的基于ConcurrentHashMap + ScheduledExecutorService 实现的定时缓存。\n * 同时对外暴露{@code AuthStateCache}接口,可进行"
},
{
"path": "src/main/java/me/zhyd/oauth/config/AuthConfig.java",
"chars": 6586,
"preview": "package me.zhyd.oauth.config;\n\nimport com.xkcoding.http.config.HttpConfig;\nimport lombok.*;\nimport me.zhyd.oauth.model.A"
},
{
"path": "src/main/java/me/zhyd/oauth/config/AuthDefaultSource.java",
"chars": 37116,
"preview": "package me.zhyd.oauth.config;\n\nimport me.zhyd.oauth.enums.AuthResponseStatus;\nimport me.zhyd.oauth.exception.AuthExcepti"
},
{
"path": "src/main/java/me/zhyd/oauth/config/AuthSource.java",
"chars": 1927,
"preview": "package me.zhyd.oauth.config;\n\nimport me.zhyd.oauth.enums.AuthResponseStatus;\nimport me.zhyd.oauth.exception.AuthExcepti"
},
{
"path": "src/main/java/me/zhyd/oauth/config/JustAuthLogConfig.java",
"chars": 505,
"preview": "package me.zhyd.oauth.config;\n\nimport me.zhyd.oauth.log.Log;\n\n/**\n * JustAuth 日志配置类\n *\n * @author HeJin\n */\npublic class"
},
{
"path": "src/main/java/me/zhyd/oauth/config/package-info.java",
"chars": 97,
"preview": "/**\n * JustAuth 核心配置相关,包括{@code AuthConfig}和{@code AuthSource}\n */\npackage me.zhyd.oauth.config;\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/AuthResponseStatus.java",
"chars": 1301,
"preview": "package me.zhyd.oauth.enums;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * JustAuth通用的状态码对照表\n *\n * @a"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/AuthToutiaoErrorCode.java",
"chars": 1181,
"preview": "package me.zhyd.oauth.enums;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 今日头条授权登录时的异常状态码\n *\n * @aut"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/AuthUserGender.java",
"chars": 1479,
"preview": "package me.zhyd.oauth.enums;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\nimport me.zhyd.oauth.utils.StringU"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/package-info.java",
"chars": 51,
"preview": "/**\n * 提供一些必要的枚举类\n */\npackage me.zhyd.oauth.enums;\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthAmazonScope.java",
"chars": 820,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Amazon平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthAppleScope.java",
"chars": 478,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * @see <a href=\"https:"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthBaiduScope.java",
"chars": 816,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 百度平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthCodingScope.java",
"chars": 783,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Coding平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthDingTalkScope.java",
"chars": 670,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 钉钉平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthDouyinScope.java",
"chars": 2238,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 抖音平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthFacebookScope.java",
"chars": 1349,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Facebook 平台 OAuth 授权"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthFigmaScope.java",
"chars": 1124,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Figma OAuth 授权范围\n * "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthGiteeScope.java",
"chars": 1031,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Gitee 平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthGithubScope.java",
"chars": 4970,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Github平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthGitlabScope.java",
"chars": 2132,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Gitlab 平台 OAuth 授权范围"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthGoogleScope.java",
"chars": 43859,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\nimport java.util.Arrays;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiScope.java",
"chars": 1690,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 华为平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthHuaweiV3Scope.java",
"chars": 1752,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 华为平台 V3 版本 OAuth 授权范"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthJdScope.java",
"chars": 509,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 京东平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthKujialeScope.java",
"chars": 634,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 酷家乐平台 OAuth 授权范围\n *\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthLineScope.java",
"chars": 623,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Line 平台 OAuth 授权范围\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthLinkedinScope.java",
"chars": 2294,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 领英平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthMiScope.java",
"chars": 621,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 小米平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthMicrosoftScope.java",
"chars": 3267,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 微软平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthOktaScope.java",
"chars": 5950,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Okta 平台 OAuth 授权范围\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthPinterestScope.java",
"chars": 974,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Pinterest 平台 OAuth 授"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthProginnScope.java",
"chars": 702,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Gitee 平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthQqScope.java",
"chars": 978,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * QQ 平台 OAuth 授权范围\n *\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthRenrenScope.java",
"chars": 2571,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 人人平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthScope.java",
"chars": 421,
"preview": "package me.zhyd.oauth.enums.scope;\n\n/**\n * 各个平台 scope 类的统一接口\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthSlackScope.java",
"chars": 9568,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Slack 平台 OAuth 授权范围\n"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthStackoverflowScope.java",
"chars": 820,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * Stackoverflow 平台 OAu"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthWeChatEnterpriseWebScope.java",
"chars": 516,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 企业自建应用授权范围\n *\n * @au"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthWechatMpScope.java",
"chars": 645,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 微信公众平台 OAuth 授权范围\n *"
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/AuthWeiboScope.java",
"chars": 1855,
"preview": "package me.zhyd.oauth.enums.scope;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\n/**\n * 微博平台 OAuth 授权范围\n *\n "
},
{
"path": "src/main/java/me/zhyd/oauth/enums/scope/package-info.java",
"chars": 149,
"preview": "/**\n * 各个平台的授权范围\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n * @version 1.0.0\n * @since 1.15.7\n */\npackag"
},
{
"path": "src/main/java/me/zhyd/oauth/exception/AuthException.java",
"chars": 1459,
"preview": "package me.zhyd.oauth.exception;\n\nimport me.zhyd.oauth.config.AuthSource;\nimport me.zhyd.oauth.enums.AuthResponseStatus;"
},
{
"path": "src/main/java/me/zhyd/oauth/exception/package-info.java",
"chars": 59,
"preview": "/**\n * JustAuth专用异常封装\n */\npackage me.zhyd.oauth.exception;\n"
},
{
"path": "src/main/java/me/zhyd/oauth/log/Log.java",
"chars": 3541,
"preview": "package me.zhyd.oauth.log;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Getter;\n\nimport java.io.PrintStream;\nimport "
},
{
"path": "src/main/java/me/zhyd/oauth/log/package-info.java",
"chars": 121,
"preview": "/**\n * 针对JustAuth简单封装的日志打印工具,可用过{@link me.zhyd.oauth.config.JustAuthLogConfig}开关日志和指定日志级别\n */\npackage me.zhyd.oauth.log;"
},
{
"path": "src/main/java/me/zhyd/oauth/model/AuthCallback.java",
"chars": 1623,
"preview": "package me.zhyd.oauth.model;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Builder;\nimport lombok.Getter;\nimport lomb"
},
{
"path": "src/main/java/me/zhyd/oauth/model/AuthResponse.java",
"chars": 690,
"preview": "package me.zhyd.oauth.model;\n\nimport lombok.*;\nimport me.zhyd.oauth.enums.AuthResponseStatus;\n\nimport java.io.Serializab"
},
{
"path": "src/main/java/me/zhyd/oauth/model/AuthToken.java",
"chars": 1354,
"preview": "package me.zhyd.oauth.model;\n\nimport lombok.*;\n\nimport java.io.Serializable;\n\n/**\n * 授权所需的token\n *\n * @author yadong.zha"
},
{
"path": "src/main/java/me/zhyd/oauth/model/AuthUser.java",
"chars": 1372,
"preview": "package me.zhyd.oauth.model;\n\nimport com.alibaba.fastjson.JSONObject;\nimport lombok.*;\nimport me.zhyd.oauth.enums.AuthUs"
},
{
"path": "src/main/java/me/zhyd/oauth/model/package-info.java",
"chars": 82,
"preview": "/**\n * JustAuth核心模型类,封装了用户、token、响应和callback等实体类\n */\npackage me.zhyd.oauth.model;\n"
},
{
"path": "src/main/java/me/zhyd/oauth/package-info.java",
"chars": 307,
"preview": "/**\n * JustAuth,如你所见,它仅仅是一个第三方授权登录的工具类库,它可以让我们脱离繁琐的第三方登录SDK,让登录变得So easy!\n * <p>\n * 史上最全的整合第三方登录的开源库。目前已支持Github、Gitee、微"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AbstractAuthDingtalkRequest.java",
"chars": 3543,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AbstractAuthMicrosoftRequest.java",
"chars": 6881,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AbstractAuthWeChatEnterpriseRequest.java",
"chars": 5107,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAfDianRequest.java",
"chars": 2471,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAlipayCertRequest.java",
"chars": 5516,
"preview": "package me.zhyd.oauth.request;\n\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.alipay.api.AlipayApiException;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAlipayRequest.java",
"chars": 10056,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.alipay.api.AlipayApiException;\nimport"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAliyunRequest.java",
"chars": 1942,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAmazonRequest.java",
"chars": 7536,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.constants.Constants;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthAppleRequest.java",
"chars": 6257,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport io.jsonwebtoken.Jwts;\nimport io.jsonwebto"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthBaiduRequest.java",
"chars": 5298,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthCodingRequest.java",
"chars": 4385,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthCsdnRequest.java",
"chars": 2083,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthDefaultRequest.java",
"chars": 8739,
"preview": "package me.zhyd.oauth.request;\n\nimport com.xkcoding.http.util.UrlUtil;\nimport me.zhyd.oauth.cache.AuthDefaultStateCache;"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthDingTalkAccountRequest.java",
"chars": 632,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthDingTalkRequest.java",
"chars": 596,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthDingTalkV2Request.java",
"chars": 4327,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java",
"chars": 5818,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthElemeRequest.java",
"chars": 6967,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.utils.HttpUtils;\nimport com"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthFacebookRequest.java",
"chars": 4342,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java",
"chars": 5901,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkc"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthFigmaRequest.java",
"chars": 4518,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthGiteeRequest.java",
"chars": 3143,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthGithubRequest.java",
"chars": 3340,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthGitlabRequest.java",
"chars": 3210,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthGoogleRequest.java",
"chars": 3827,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.utils.HttpUtils;\nimport com"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthHuaweiRequest.java",
"chars": 6166,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthHuaweiV3Request.java",
"chars": 7337,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.constants.Constants;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthJdRequest.java",
"chars": 5685,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthKujialeRequest.java",
"chars": 4383,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthLineRequest.java",
"chars": 5495,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthLinkedinRequest.java",
"chars": 7848,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONArray;\nimport com.alibaba.fastjson.JSONObject;\nimport co"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthMeituanRequest.java",
"chars": 4061,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthMiRequest.java",
"chars": 5290,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.constants.Constants;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthMicrosoftCnRequest.java",
"chars": 1203,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthMicrosoftRequest.java",
"chars": 1235,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthOktaRequest.java",
"chars": 6650,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthOschinaRequest.java",
"chars": 3500,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthPinterestRequest.java",
"chars": 3915,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthProginnRequest.java",
"chars": 3455,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthQQMiniProgramRequest.java",
"chars": 3292,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.alibaba.fastjson.annotation.JSONField"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthQqRequest.java",
"chars": 5290,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthRenrenRequest.java",
"chars": 4513,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONArray;\nimport com.alibaba.fastjson.JSONObject;\nimport co"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthRequest.java",
"chars": 2484,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.enums.AuthResponseStatus;\nimport me.zhyd.oauth.exception.AuthExcept"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthSlackRequest.java",
"chars": 5587,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONArray;\nimport com.alibaba.fastjson.JSONObject;\nimport co"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthStackOverflowRequest.java",
"chars": 3787,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.constants.Constants;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthTaobaoRequest.java",
"chars": 3958,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthTeambitionRequest.java",
"chars": 4210,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.utils.HttpUtils;\nimport com"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthToutiaoRequest.java",
"chars": 4239,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthTwitterRequest.java",
"chars": 7237,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.constants.Constants;\nim"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseQrcodeRequest.java",
"chars": 1253,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseQrcodeV2Request.java",
"chars": 2032,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseThirdQrcodeRequest.java",
"chars": 4325,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatEnterpriseWebRequest.java",
"chars": 1466,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatMpRequest.java",
"chars": 6298,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.cache.AuthStateCache;\nimpor"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeChatOpenRequest.java",
"chars": 5531,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport me.zhyd.oauth.utils.HttpUtils;\nimport me."
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWechatMiniProgramRequest.java",
"chars": 3378,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.alibaba.fastjson.annotation.JSONField"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthWeiboRequest.java",
"chars": 4516,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.support.HttpHeader;\nimp"
},
{
"path": "src/main/java/me/zhyd/oauth/request/AuthXmlyRequest.java",
"chars": 4298,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSONObject;\nimport com.xkcoding.http.HttpUtil;\nimport me.zhy"
},
{
"path": "src/main/java/me/zhyd/oauth/request/package-info.java",
"chars": 83,
"preview": "/**\n * JustAuth核心组件,所有授权登录都是基于{@code request}实现\n */\npackage me.zhyd.oauth.request;\n"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/AuthChecker.java",
"chars": 3957,
"preview": "package me.zhyd.oauth.utils;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimport "
},
{
"path": "src/main/java/me/zhyd/oauth/utils/AuthScopeUtils.java",
"chars": 1250,
"preview": "package me.zhyd.oauth.utils;\n\nimport me.zhyd.oauth.enums.scope.AuthScope;\n\nimport java.util.Arrays;\nimport java.util.Lis"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/AuthStateUtils.java",
"chars": 373,
"preview": "package me.zhyd.oauth.utils;\n\n/**\n * AuthState工具类,默认只提供一个创建随机uuid的方法\n *\n * @author yadong.zhang (yadong.zhang0415(a)gmai"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/Base64Utils.java",
"chars": 5718,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.nio.charset.Charset;\nimport java.nio.charset.StandardCharsets;\n\n/**\n * Base64编"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/GlobalAuthUtils.java",
"chars": 11916,
"preview": "package me.zhyd.oauth.utils;\n\nimport com.alibaba.fastjson.JSON;\nimport me.zhyd.oauth.exception.AuthException;\n\nimport ja"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/HttpUtils.java",
"chars": 3139,
"preview": "package me.zhyd.oauth.utils;\n\nimport com.xkcoding.http.HttpUtil;\nimport com.xkcoding.http.config.HttpConfig;\nimport com."
},
{
"path": "src/main/java/me/zhyd/oauth/utils/IpUtils.java",
"chars": 506,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.net.InetAddress;\nimport java.net.UnknownHostException;\n\n/**\n * 获取IP的工具类\n *\n * "
},
{
"path": "src/main/java/me/zhyd/oauth/utils/PkceUtil.java",
"chars": 1186,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.nio.charset.StandardCharsets;\n\n/**\n * 该配置仅用于支持 PKCE 模式的平台,针对无服务应用,不推荐使用隐式授权,推荐"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/RandomUtil.java",
"chars": 884,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.util.concurrent.ThreadLocalRandom;\n\n/**\n * 生成随机字符串\n *\n * @author yadong.zhang "
},
{
"path": "src/main/java/me/zhyd/oauth/utils/Sha256.java",
"chars": 690,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.nio.charset.StandardCharsets;\nimport java.security.MessageDigest;\nimport java."
},
{
"path": "src/main/java/me/zhyd/oauth/utils/StringUtils.java",
"chars": 1776,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.nio.charset.Charset;\n\n/**\n * @author yadong.zhang (yadong.zhang0415(a)gmail.co"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/UrlBuilder.java",
"chars": 1909,
"preview": "package me.zhyd.oauth.utils;\n\nimport com.xkcoding.http.util.MapUtil;\nimport com.xkcoding.http.util.StringUtil;\nimport lo"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/UuidUtils.java",
"chars": 2254,
"preview": "package me.zhyd.oauth.utils;\n\nimport java.nio.charset.StandardCharsets;\nimport java.util.concurrent.ThreadLocalRandom;\n\n"
},
{
"path": "src/main/java/me/zhyd/oauth/utils/package-info.java",
"chars": 54,
"preview": "/**\n * 提供一些简单的工具和校验等\n */\npackage me.zhyd.oauth.utils;\n"
},
{
"path": "src/test/java/me/zhyd/oauth/AuthRequestBuilderTest.java",
"chars": 4514,
"preview": "package me.zhyd.oauth;\n\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd.oauth.config.AuthDefaultSource;\nimport me"
},
{
"path": "src/test/java/me/zhyd/oauth/cache/AuthStateCacheTest.java",
"chars": 972,
"preview": "package me.zhyd.oauth.cache;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\nimport java.util.concurrent.TimeUnit;\n\npu"
},
{
"path": "src/test/java/me/zhyd/oauth/config/AuthExtendSource.java",
"chars": 1356,
"preview": "package me.zhyd.oauth.config;\n\nimport me.zhyd.oauth.request.AuthDefaultRequest;\nimport me.zhyd.oauth.request.AuthExtendR"
},
{
"path": "src/test/java/me/zhyd/oauth/log/LogTest.java",
"chars": 3095,
"preview": "package me.zhyd.oauth.log;\n\nimport org.junit.Test;\n\n/**\n * @author yadong.zhang (yadong.zhang0415(a)gmail.com)\n * @versi"
},
{
"path": "src/test/java/me/zhyd/oauth/model/AuthUserTest.java",
"chars": 1550,
"preview": "package me.zhyd.oauth.model;\n\nimport com.alibaba.fastjson.JSON;\nimport me.zhyd.oauth.config.AuthDefaultSource;\nimport me"
},
{
"path": "src/test/java/me/zhyd/oauth/request/AuthExtendRequest.java",
"chars": 2874,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.cache.AuthStateCache;\nimport me.zhyd.oauth.config.AuthConfig;\nimpor"
},
{
"path": "src/test/java/me/zhyd/oauth/request/AuthExtendRequestTest.java",
"chars": 2569,
"preview": "package me.zhyd.oauth.request;\n\nimport com.alibaba.fastjson.JSON;\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd"
},
{
"path": "src/test/java/me/zhyd/oauth/request/AuthWeChatEnterpriseWebRequestTest.java",
"chars": 569,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd.oauth.utils.AuthStateUtils;\nimpor"
},
{
"path": "src/test/java/me/zhyd/oauth/request/AuthWeChatMpRequestTest.java",
"chars": 513,
"preview": "package me.zhyd.oauth.request;\n\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd.oauth.utils.AuthStateUtils;\nimpor"
},
{
"path": "src/test/java/me/zhyd/oauth/utils/GlobalAuthUtilsTest.java",
"chars": 10705,
"preview": "package me.zhyd.oauth.utils;\n\nimport com.alibaba.fastjson.JSON;\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd.o"
},
{
"path": "src/test/java/me/zhyd/oauth/utils/JsonPathTest.java",
"chars": 1054,
"preview": "package me.zhyd.oauth.utils;\n\nimport com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.JSONObject;\nimport com.aliba"
},
{
"path": "src/test/java/me/zhyd/oauth/utils/ScopeTest.java",
"chars": 67119,
"preview": "package me.zhyd.oauth.utils;\n\nimport org.junit.Test;\n\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java."
},
{
"path": "src/test/java/me/zhyd/oauth/utils/StringUtilsTest.java",
"chars": 2710,
"preview": "package me.zhyd.oauth.utils;\n\nimport org.junit.Assert;\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.ru"
},
{
"path": "src/test/java/me/zhyd/oauth/utils/UrlBuilderTest.java",
"chars": 2221,
"preview": "package me.zhyd.oauth.utils;\n\nimport me.zhyd.oauth.config.AuthConfig;\nimport me.zhyd.oauth.config.AuthDefaultSource;\nimp"
},
{
"path": "src/test/java/me/zhyd/oauth/utils/UuidUtilsTest.java",
"chars": 208,
"preview": "package me.zhyd.oauth.utils;\n\nimport org.junit.Test;\n\npublic class UuidUtilsTest {\n\n @Test\n public void getUUID() "
}
]
About this extraction
This page contains the full source code of the justauth/JustAuth GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 176 files (613.3 KB), approximately 159.9k tokens, and a symbol index with 1043 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.