修复basic鉴权覆盖jwt鉴权问题

This commit is contained in:
Liujian
2023-08-14 16:06:26 +08:00
parent 5f9dfde4db
commit 89af99dae0

View File

@@ -33,14 +33,13 @@ func (b *basic) GetUser(ctx http_service.IHttpContext) (*application.UserInfo, b
}
username, password := parseToken(token)
if username == "" {
return nil, true
return nil, false
}
user, has := b.users.Get(username)
if has {
if password == user.Value {
return user, true
}
return nil, true
}
return nil, false
}