add oauth loginlog & fix bugs
This commit is contained in:
1 parent
ebd1feb8d1
commit
a4b413dadb
48 files changed
+3477
-184
No files matched your search
@@ -17,6 +17,13 @@ func RustAuth() gin.HandlerFunc {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if len(token) <= 7 {
|
||||
c.JSON(401, gin.H{
|
||||
"error": "Unauthorized",
|
||||
})
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
//提取token,格式是Bearer {token}
|
||||
//这里只是简单的提取
|
||||
token = token[7:]
|
||||
|
||||
Reference in new issue
Block a user