Compare commits
8 Commits
1.3.4.beta
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b45e9ab43d | ||
|
|
4233902219 | ||
|
|
7f04dd3bfd | ||
|
|
b24d490024 | ||
|
|
4250bdcf0c | ||
|
|
be41025184 | ||
|
|
e283b4731a | ||
|
|
155786d42d |
65
.github/workflows/deploy-snapshot.yml
vendored
Normal file
65
.github/workflows/deploy-snapshot.yml
vendored
Normal 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
26
.github/workflows/test-pr.yml
vendored
Normal 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
|
||||
14
CHANGELOG.md
14
CHANGELOG.md
@@ -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
|
||||
|
||||
20
README.md
20
README.md
@@ -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
22
pom.xml
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user