1
0
mirror of synced 2025-12-21 06:18:01 +08:00

8 Commits

Author SHA1 Message Date
kang
b45e9ab43d 为本项目添加 SNAPSHOT 自动触发流水线 (#15)
* ci: Add snapshot deploy and test PR
2021-09-28 18:12:39 +08:00
Yangkai.Shen
4233902219 🔖 发布 1.4.0 2021-05-10 15:55:28 +08:00
Yangkai.Shen
7f04dd3bfd 📝 编写更新记录 2021-01-04 18:50:43 +08:00
yadong.zhang
b24d490024 ⬆️ 升级 JustAuth 版本:1.15.9,新增飞书、京东、阿里云、喜马拉雅、企业微信网页端登录 2021-01-04 11:12:32 +08:00
Yangkai.Shen
4250bdcf0c 📝 编写文档 2020-09-12 08:12:23 +08:00
Yangkai.Shen
be41025184 🔖 发布 1.3.4 2020-09-12 08:11:35 +08:00
Yangkai.Shen
e283b4731a 📝 更新记录 2020-09-12 08:11:09 +08:00
Yangkai.Shen
155786d42d ⬆️ 依赖升级,JustAuth 1.15.7.beta3 -> 1.15.7 2020-09-12 08:09:42 +08:00
6 changed files with 160 additions and 13 deletions

65
.github/workflows/deploy-snapshot.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Deploy
on:
push:
branches: [ dev ]
paths:
- src/**
- pom.xml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.2.0
- name: Set up Java and Maven
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- 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: 'adopt'
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 }}

26
.github/workflows/test-pr.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: test pull_request
on:
pull_request:
paths:
- src/**
- pom.xml
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.2.0
- name: Set up Java and Maven
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- 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

View File

@@ -1,5 +1,19 @@
## 版本更新记录
### 【1.4.0】2021-05-10
- 升级 `JustAuth` 版本1.16.1新增Amazon、Slack、LINE、Okta、钉钉账号登录同时修复若干BUG详细信息请参考参考https://github.com/justauth/JustAuth/blob/master/CHANGELOGS.md#1161
- 升级 `hutool-core` 版本5.6.5
### 【1.3.5】2021-01-04
- 升级 `JustAuth` 版本1.15.9,新增飞书、京东、阿里云、喜马拉雅、企业微信网页端登录
- 升级 `hutool-core` 版本5.5.6
### 【1.3.4】2020-09-12
- 升级 `JustAuth` 版本1.15.7,更新最新的 GitHub API
### 【1.3.4.beta】2020-08-29
- 升级 `JustAuth` 版本1.15.7-beta.3,支持自定义 http config 以及自定义 scopes

View File

@@ -28,7 +28,7 @@ https://github.com/xkcoding/justauth-spring-boot-starter-demo
<dependency>
<groupId>com.xkcoding.justauth</groupId>
<artifactId>justauth-spring-boot-starter</artifactId>
<version>1.3.4.beta</version>
<version>1.4.0</version>
</dependency>
```
@@ -172,6 +172,24 @@ justauth:
client-id: 10**********6
client-secret: 1f7d08**********5b7**********29e
redirect-uri: http://oauth.xkcoding.com/demo/oauth/twitter/callback
XMLY:
client-id: 10**********6
client-secret: 1f7d08**********5b7**********29e
redirect-uri: http://oauth.xkcoding.com/demo/oauth/xmly/callback
# 设备唯一标识ID
device-id: xxxxxxxxxxxxxx
# 客户端操作系统类型1-iOS系统2-Android系统3-Web
client-os-type: 3
# 客户端包名,如果 clientOsType 为1或2时必填。对Android客户端是包名对IOS客户端是Bundle ID
#pack-id: xxxx
FEISHU:
client-id: 10**********6
client-secret: 1f7d08**********5b7**********29e
redirect-uri: http://oauth.xkcoding.com/demo/oauth/feishu/callback
JD:
client-id: 10**********6
client-secret: 1f7d08**********5b7**********29e
redirect-uri: http://oauth.xkcoding.com/demo/oauth/jd/callback
cache:
type: default
```

22
pom.xml
View File

@@ -23,7 +23,7 @@
<groupId>com.xkcoding.justauth</groupId>
<artifactId>justauth-spring-boot-starter</artifactId>
<version>1.3.4.beta</version>
<version>1.4.0</version>
<name>justauth-spring-boot-starter</name>
<url>https://github.com/xkcoding/justauth-spring-boot-starter</url>
@@ -72,8 +72,8 @@
<!--SpringBoot版本-->
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
<!--JustAuth版本-->
<justauth.version>1.15.7-beta.3</justauth.version>
<hutool.version>5.4.0</hutool.version>
<justauth.version>1.16.1</justauth.version>
<hutool.version>5.6.5</hutool.version>
</properties>
<dependencies>
@@ -215,6 +215,15 @@
</repositories>
<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>
@@ -236,14 +245,9 @@
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>oss</id>
<name>Oss Release Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>oss</id>
<name>Oss Snapshot Repository</name>
<name>Oss Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

View File

@@ -186,6 +186,8 @@ public class AuthRequestFactory {
return new AuthGiteeRequest(config, authStateCache);
case DINGTALK:
return new AuthDingTalkRequest(config, authStateCache);
case DINGTALK_ACCOUNT:
return new AuthDingTalkAccountRequest(config, authStateCache);
case BAIDU:
return new AuthBaiduRequest(config, authStateCache);
case CSDN:
@@ -198,12 +200,14 @@ public class AuthRequestFactory {
return new AuthAlipayRequest(config, authStateCache);
case QQ:
return new AuthQqRequest(config, authStateCache);
case WECHAT_MP:
return new AuthWeChatMpRequest(config, authStateCache);
case WECHAT_OPEN:
return new AuthWeChatOpenRequest(config, authStateCache);
case WECHAT_MP:
return new AuthWeChatMpRequest(config, authStateCache);
case WECHAT_ENTERPRISE:
return new AuthWeChatEnterpriseRequest(config, authStateCache);
return new AuthWeChatEnterpriseQrcodeRequest(config, authStateCache);
case WECHAT_ENTERPRISE_WEB:
return new AuthWeChatEnterpriseWebRequest(config, authStateCache);
case TAOBAO:
return new AuthTaobaoRequest(config, authStateCache);
case GOOGLE:
@@ -240,6 +244,22 @@ public class AuthRequestFactory {
return new AuthMeituanRequest(config, authStateCache);
case TWITTER:
return new AuthTwitterRequest(config, authStateCache);
case FEISHU:
return new AuthFeishuRequest(config, authStateCache);
case JD:
return new AuthJdRequest(config, authStateCache);
case ALIYUN:
return new AuthAliyunRequest(config, authStateCache);
case XMLY:
return new AuthXmlyRequest(config, authStateCache);
case AMAZON:
return new AuthAmazonRequest(config, authStateCache);
case SLACK:
return new AuthSlackRequest(config, authStateCache);
case LINE:
return new AuthLineRequest(config, authStateCache);
case OKTA:
return new AuthOktaRequest(config, authStateCache);
default:
return null;
}