mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-05 01:20:25 +08:00
API认证超时时增加检查系统时钟提示
This commit is contained in:
@@ -128,7 +128,7 @@ func ValidateRequest(ctx context.Context, userTypes ...UserType) (userType UserT
|
||||
timestamp := m.GetInt64("timestamp")
|
||||
if time.Now().Unix()-timestamp > 600 {
|
||||
// 请求超过10分钟认为超时
|
||||
return UserTypeNone, 0, errors.New("authenticate timeout")
|
||||
return UserTypeNone, 0, errors.New("authenticate timeout, please check your system clock")
|
||||
}
|
||||
|
||||
t := m.GetString("type")
|
||||
|
||||
Reference in New Issue
Block a user