fix wrong source of "usergroup" metadata (#99)
* extract hardcoded jwt field names into config * Update config.go * bugfix: source group from usergroup field instead of password Co-authored-by: James Read <contact@jread.com>
This commit is contained in:
parent
e18df74d5a
commit
b6196a4b3f
|
|
@ -79,8 +79,7 @@ func UserFromContext(ctx context.Context, cfg *config.Config) *AuthenticatedUser
|
||||||
|
|
||||||
if ok {
|
if ok {
|
||||||
ret.Username = getMetdataKeyOrEmpty(md, "username")
|
ret.Username = getMetdataKeyOrEmpty(md, "username")
|
||||||
ret.Usergroup = getMetdataKeyOrEmpty(md, "password")
|
ret.Usergroup = getMetdataKeyOrEmpty(md, "usergroup")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildUserAcls(cfg, ret)
|
buildUserAcls(cfg, ret)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue