API认证超时时增加检查系统时钟提示

This commit is contained in:
GoEdgeLab
2021-06-04 15:34:58 +08:00
parent 75d0c7a4ce
commit edb8484c5c
2 changed files with 2 additions and 2 deletions

View File

@@ -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")