Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
019839782a | ||
|
|
b484c0993f | ||
|
|
ce8203401c | ||
|
|
248ec4fc4d | ||
|
|
8a2f4067c2 | ||
|
|
13fd792521 | ||
|
|
03649eb5c3 | ||
|
|
a8b8dee49f | ||
|
|
2de415c7ba | ||
|
|
c670d9d10a | ||
|
|
dea73c1c6e | ||
|
|
64a389aac4 | ||
|
|
e07cb8970b | ||
|
|
1a690f5dd1 | ||
|
|
2029083f26 | ||
|
|
c00a127011 | ||
|
|
6b99039b98 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,5 +1,18 @@
|
||||
## 版本更新记录
|
||||
|
||||
### 【1.3.2】2019-12-25
|
||||
|
||||
- 升级 `JustAuth` 版本:1.13.2,新增微信公众号登录,区分之前的开放平台登录
|
||||
|
||||
### 【1.3.1】2019-11-12
|
||||
|
||||
- 升级 `JustAuth` 版本:1.13.1,修复 `AuthCallback` 异常的问题,参见 [ISSUE#52](https://github.com/justauth/JustAuth/issues/52)
|
||||
|
||||
### 【1.3.0】2019-11-04
|
||||
|
||||
- 修改 `groupId` 为 `com.xkcoding.justauth`
|
||||
- 升级 `JustAuth` 版本:1.13.0,支持 `推特`
|
||||
|
||||
### 【1.2.1】2019-10-12
|
||||
|
||||
- 紧急修复Oauth列表空指针BUG
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
>
|
||||
> JustAuth 脚手架
|
||||
|
||||

|
||||

|
||||
|
||||
## 1. Demo
|
||||
|
||||
@@ -26,9 +26,9 @@ https://github.com/xkcoding/justauth-spring-boot-starter-demo
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.xkcoding</groupId>
|
||||
<groupId>com.xkcoding.justauth</groupId>
|
||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -432,7 +432,7 @@ justauth:
|
||||
|
||||
### 4.2. SNAPSHOT版本
|
||||
|
||||
如果需要体验快照版本,可以在你的 `pom.xml`进行如下配置:
|
||||
如果需要体验快照版本,可以在你的 `pom.xml`进行如下配置:
|
||||
|
||||
```xml
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.xkcoding</groupId>
|
||||
<groupId>com.xkcoding.justauth</groupId>
|
||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||
<version>1.2.1</version>
|
||||
<version>1.3.2</version>
|
||||
|
||||
<name>justauth-spring-boot-starter</name>
|
||||
<url>https://github.com/xkcoding/justauth-spring-boot-starter</url>
|
||||
@@ -67,7 +67,7 @@
|
||||
<!--SpringBoot版本-->
|
||||
<spring-boot.version>2.1.8.RELEASE</spring-boot.version>
|
||||
<!--JustAuth版本-->
|
||||
<justauth.version>1.12.0</justauth.version>
|
||||
<justauth.version>1.13.2</justauth.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -65,11 +65,16 @@ public class AuthRequestFactory {
|
||||
// 扩展列表
|
||||
List<String> extendList = new ArrayList<>();
|
||||
ExtendProperties extend = properties.getExtend();
|
||||
if (null != extend){
|
||||
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());
|
||||
extendList = extend.getConfig()
|
||||
.keySet()
|
||||
.stream()
|
||||
.filter(x -> names.contains(x.toUpperCase()))
|
||||
.map(String::toUpperCase)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 合并
|
||||
@@ -183,8 +188,12 @@ public class AuthRequestFactory {
|
||||
return new AuthAlipayRequest(config, authStateCache);
|
||||
case QQ:
|
||||
return new AuthQqRequest(config, authStateCache);
|
||||
case WECHAT:
|
||||
return new AuthWeChatRequest(config, authStateCache);
|
||||
case WECHAT_MP:
|
||||
return new AuthWeChatMpRequest(config, authStateCache);
|
||||
case WECHAT_OPEN:
|
||||
return new AuthWeChatOpenRequest(config, authStateCache);
|
||||
case WECHAT_ENTERPRISE:
|
||||
return new AuthWeChatEnterpriseRequest(config, authStateCache);
|
||||
case TAOBAO:
|
||||
return new AuthTaobaoRequest(config, authStateCache);
|
||||
case GOOGLE:
|
||||
@@ -211,8 +220,6 @@ public class AuthRequestFactory {
|
||||
return new AuthStackOverflowRequest(config, authStateCache);
|
||||
case HUAWEI:
|
||||
return new AuthHuaweiRequest(config, authStateCache);
|
||||
case WECHAT_ENTERPRISE:
|
||||
return new AuthWeChatEnterpriseRequest(config, authStateCache);
|
||||
case GITLAB:
|
||||
return new AuthGitlabRequest(config, authStateCache);
|
||||
case KUJIALE:
|
||||
@@ -221,6 +228,8 @@ public class AuthRequestFactory {
|
||||
return new AuthElemeRequest(config, authStateCache);
|
||||
case MEITUAN:
|
||||
return new AuthMeituanRequest(config, authStateCache);
|
||||
case TWITTER:
|
||||
return new AuthTwitterRequest(config, authStateCache);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ abstract class JustAuthStateCacheConfiguration {
|
||||
log.debug("JustAuth 使用 Redis 缓存存储 state 数据");
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Bean(name = "justAuthRedisCacheTemplate")
|
||||
public RedisTemplate<String, String> justAuthRedisCacheTemplate(RedisConnectionFactory redisConnectionFactory) {
|
||||
RedisTemplate<String, String> template = new RedisTemplate<>();
|
||||
template.setKeySerializer(new StringRedisSerializer());
|
||||
|
||||
Reference in New Issue
Block a user