mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-10 04:47:53 +00:00
adding Groups Struct back in
"It was pure hubris that brought us to this point."
This commit is contained in:
parent
8d6490329b
commit
e335886741
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue