mirror of
https://github.com/eolinker/apinto
synced 2025-12-24 13:28:15 +08:00
修复basic鉴权覆盖jwt鉴权问题
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user