adding Groups Struct back in

"It was pure hubris that brought us to this point."
This commit is contained in:
reesporte 2022-01-04 16:23:25 -06:00
parent 8d6490329b
commit e335886741

View file

@ -82,6 +82,11 @@ type Group struct {
GroupName string `json:"displayName"`
}
// Groups holds a slice of Group informations for marshalling from Json
type Groups struct {
Groups []Group `json:"value"`
}
// UserInfo holds user information for an authenticated user
type UserInfo struct {
UserID string `json:"userid"`
@ -203,7 +208,7 @@ func (a *Auth) newCookieValue(token *oauth2.Token) (*CookieValue, error) {
return &CookieValue{
UserID: claims["oid"].(string),
UserName: claims["name"].(string),
GroupMembership: groups,
GroupMembership: groups.Groups,
Token: token,
}, nil
}