We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a01f1f commit 3335df9Copy full SHA for 3335df9
1 file changed
README.md
@@ -29,6 +29,7 @@ $ php think jwt:make
29
* `model` 用户模型
30
* `refresh` Token过期抛异常code = 50001
31
* `relogin` Token失效异常code = 50002
32
+* `automaticRenewal` [开启过期自动续签](过期自动续签)
33
34
以下两个异常都会抛一个HTTP异常 StatusCode = 401
35
* `xiaodi\Exception\HasLoggedException`
@@ -135,3 +136,15 @@ return [
135
136
137
];
138
```
139
+
140
+## 过期自动续签
141
+`app/config/jwt.php`
142
143
+`automaticRenewal => true`
144
145
+系统检测到 Token 已过期, 会自动续期并返回以下 header 信息。
146
147
+* Automatic-Renewal-Token
148
+* Automatic-Renewal-Token-RefreshAt
149
150
+前端需要接收最新 Token,下次异步请求时,携带此 Token。
0 commit comments