We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1848ceb commit 6f589d7Copy full SHA for 6f589d7
server/middleware/jwt.go
@@ -16,7 +16,7 @@ import (
16
17
func JWTAuth() gin.HandlerFunc {
18
return func(c *gin.Context) {
19
- // 我们这里jwt鉴权取头部信息 x-token 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localSstorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录
+ // 我们这里jwt鉴权取头部信息 x-token 登录时回返回token信息 这里前端需要把token存储到cookie或者本地localStorage中 不过需要跟后端协商过期时间 可以约定刷新令牌或者重新登录
20
token := c.Request.Header.Get("x-token")
21
if token == "" {
22
response.Result(response.ERROR, gin.H{
0 commit comments