add oauth loginlog & fix bugs

This commit is contained in:
ljw
2024-09-19 10:44:49 +08:00
parent ebd1feb8d1
commit a4b413dadb
48 changed files with 3477 additions and 184 deletions

View File

@@ -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:]