From e3358867414923a0eba4715a74932cbe46e273a9 Mon Sep 17 00:00:00 2001 From: reesporte Date: Tue, 4 Jan 2022 16:23:25 -0600 Subject: [PATCH] adding Groups Struct back in "It was pure hubris that brought us to this point." --- authn/authenticate.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/authn/authenticate.go b/authn/authenticate.go index 27a1a8318..af95e953d 100644 --- a/authn/authenticate.go +++ b/authn/authenticate.go @@ -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 }