mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-12-03 02:23:16 +00:00
fix: Jwt
This commit is contained in:
@@ -68,7 +68,7 @@ func (us *UserService) InfoByAccessToken(token string) (*model.User, *model.User
|
||||
|
||||
// GenerateToken 生成token
|
||||
func (us *UserService) GenerateToken(u *model.User) string {
|
||||
if global.Config.Jwt.Key != "" {
|
||||
if len(global.Jwt.Key) > 0 {
|
||||
return global.Jwt.GenerateToken(u.Id)
|
||||
}
|
||||
return utils.Md5(u.Username + time.Now().String())
|
||||
|
||||
Reference in New Issue
Block a user