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

This commit is contained in:
刘祥超
2021-06-04 15:34:58 +08:00
parent 94c4098de5
commit 7936dc85a9
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")