From 37bbceb6aff7dd1d85f86559b6fd744e3cc43b34 Mon Sep 17 00:00:00 2001
From: "Yangkai.Shen" <237497819@qq.com>
Date: Thu, 5 Sep 2019 15:23:02 +0800
Subject: [PATCH] =?UTF-8?q?:arrow=5Fup:=20=E5=8D=87=E7=BA=A7=20justauth-sp?=
=?UTF-8?q?ring-boot-starter=20=E7=89=88=E6=9C=AC=E4=B8=BA=201.1.0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
spring-boot-demo-social/README.md | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/spring-boot-demo-social/README.md b/spring-boot-demo-social/README.md
index bab169b..5a23eb6 100644
--- a/spring-boot-demo-social/README.md
+++ b/spring-boot-demo-social/README.md
@@ -237,6 +237,14 @@ $ nginx -s reload
## 2. 主要代码
+> 本 demo 采用 Redis 缓存 state,所以请准备 Redis 环境,如果没有 Redis 环境,可以将配置文件的缓存配置为
+>
+> ```yaml
+> justauth:
+> cache:
+> type: default
+> ```
+
### 2.1. pom.xml
```xml
@@ -262,7 +270,7 @@ $ nginx -s reload
UTF-8
UTF-8
1.8
- 1.0.0
+ 1.1.0
@@ -386,6 +394,10 @@ justauth:
client-secret: 8G6PCr00j************************rgk************AyzaPc78
redirect-uri: http://oauth.xkcoding.com/demo/oauth/wechat_enterprise/callback
agent-id: 1*******2
+ cache:
+ type: redis
+ prefix: 'SOCIAL::STATE::'
+ timeout: 1h
```
### 2.3. OauthController.java
@@ -460,7 +472,7 @@ public class OauthController {
### 2.4. 如果想要自定义 state 缓存
-请看👉[这里](https://github.com/xkcoding/spring-boot-demo/tree/master/spring-boot-demo-social/src/main/java/com/xkcoding/social/config/justauth)
+请看👉[这里](https://github.com/justauth/justauth-spring-boot-starter#2-%E7%BC%93%E5%AD%98%E9%85%8D%E7%BD%AE)
## 3. 运行方式