Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2de415c7ba | ||
|
|
c670d9d10a | ||
|
|
dea73c1c6e | ||
|
|
64a389aac4 | ||
|
|
e07cb8970b | ||
|
|
1a690f5dd1 | ||
|
|
2029083f26 | ||
|
|
c00a127011 | ||
|
|
6b99039b98 | ||
|
|
0b00363336 | ||
|
|
70e9fc0af9 | ||
|
|
2e723b2c51 | ||
|
|
011ad64fea |
@@ -1,5 +1,14 @@
|
|||||||
## 版本更新记录
|
## 版本更新记录
|
||||||
|
|
||||||
|
### 【1.3.0】2019-11-04
|
||||||
|
|
||||||
|
- 修改 `groupId` 为 `com.xkcoding.justauth`
|
||||||
|
- 升级 `JustAuth` 版本:1.13.0,支持 `推特`
|
||||||
|
|
||||||
|
### 【1.2.1】2019-10-12
|
||||||
|
|
||||||
|
- 紧急修复Oauth列表空指针BUG
|
||||||
|
|
||||||
### 【1.2.0】2019-10-09
|
### 【1.2.0】2019-10-09
|
||||||
|
|
||||||
- 升级 `JustAuth` 版本:1.12.0,支持 `饿了么`、`美团`
|
- 升级 `JustAuth` 版本:1.12.0,支持 `饿了么`、`美团`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
>
|
>
|
||||||
> JustAuth 脚手架
|
> JustAuth 脚手架
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## 1. Demo
|
## 1. Demo
|
||||||
|
|
||||||
@@ -26,9 +26,9 @@ https://github.com/xkcoding/justauth-spring-boot-starter-demo
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xkcoding</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>1.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -432,7 +432,7 @@ justauth:
|
|||||||
|
|
||||||
### 4.2. SNAPSHOT版本
|
### 4.2. SNAPSHOT版本
|
||||||
|
|
||||||
如果需要体验快照版本,可以在你的 `pom.xml`进行如下配置:
|
如果需要体验快照版本,可以在你的 `pom.xml`进行如下配置:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@@ -21,9 +21,9 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.xkcoding</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
<version>1.2.0</version>
|
<version>1.3.0</version>
|
||||||
|
|
||||||
<name>justauth-spring-boot-starter</name>
|
<name>justauth-spring-boot-starter</name>
|
||||||
<url>https://github.com/xkcoding/justauth-spring-boot-starter</url>
|
<url>https://github.com/xkcoding/justauth-spring-boot-starter</url>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
<!--SpringBoot版本-->
|
<!--SpringBoot版本-->
|
||||||
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
|
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
|
||||||
<!--JustAuth版本-->
|
<!--JustAuth版本-->
|
||||||
<justauth.version>1.12.0</justauth.version>
|
<justauth.version>1.13.0</justauth.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import me.zhyd.oauth.enums.AuthResponseStatus;
|
|||||||
import me.zhyd.oauth.exception.AuthException;
|
import me.zhyd.oauth.exception.AuthException;
|
||||||
import me.zhyd.oauth.request.*;
|
import me.zhyd.oauth.request.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -61,11 +62,16 @@ public class AuthRequestFactory {
|
|||||||
public List<String> oauthList() {
|
public List<String> oauthList() {
|
||||||
// 默认列表
|
// 默认列表
|
||||||
List<String> defaultList = properties.getType().keySet().stream().map(Enum::name).collect(Collectors.toList());
|
List<String> defaultList = properties.getType().keySet().stream().map(Enum::name).collect(Collectors.toList());
|
||||||
|
|
||||||
Class enumClass = properties.getExtend().getEnumClass();
|
|
||||||
List<String> names = EnumUtil.getNames(enumClass);
|
|
||||||
// 扩展列表
|
// 扩展列表
|
||||||
List<String> extendList = properties.getExtend().getConfig().keySet().stream().filter(x -> names.contains(x.toUpperCase())).map(String::toUpperCase).collect(Collectors.toList());
|
List<String> extendList = new ArrayList<>();
|
||||||
|
ExtendProperties extend = properties.getExtend();
|
||||||
|
if (null != extend) {
|
||||||
|
Class enumClass = extend.getEnumClass();
|
||||||
|
List<String> names = EnumUtil.getNames(enumClass);
|
||||||
|
// 扩展列表
|
||||||
|
extendList = extend.getConfig().keySet().stream().filter(x -> names.contains(x.toUpperCase())).map(String::toUpperCase).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
// 合并
|
// 合并
|
||||||
return (List<String>) CollUtil.addAll(defaultList, extendList);
|
return (List<String>) CollUtil.addAll(defaultList, extendList);
|
||||||
}
|
}
|
||||||
@@ -215,6 +221,8 @@ public class AuthRequestFactory {
|
|||||||
return new AuthElemeRequest(config, authStateCache);
|
return new AuthElemeRequest(config, authStateCache);
|
||||||
case MEITUAN:
|
case MEITUAN:
|
||||||
return new AuthMeituanRequest(config, authStateCache);
|
return new AuthMeituanRequest(config, authStateCache);
|
||||||
|
case TWITTER:
|
||||||
|
return new AuthTwitterRequest(config, authStateCache);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user