Skip to content

Commit

Permalink
Added UserGroupIds and TenantId to JwtToken
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish Bhat committed Jul 19, 2019
1 parent de5366b commit 77fe2b5
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions security/Token.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ const User = "User"
// JwtToken represents the parsed Token from Authentication Header
type JwtToken struct {
// UserID is id of user matchimg the token
UserID uuid.UUID `json:"user,omitempty"`
UserName string `json:"name,omitempty"`
TenantID uuid.UUID `json:"tenant,omitempty"`
ExternalID uuid.UUID `json:"externalId,omitempty"`
ExternalIDType string `json:"externalIdType,omitempty"`
Scopes []string `json:"scope,omitempty"`
Admin bool `json:"admin,omitempty"`
Raw string `json:"-"`
UserID uuid.UUID `json:"user,omitempty"`
UserName string `json:"name,omitempty"`
DisplayName string `json:"displayName,omitempty"`
UserGroupIDs []uuid.UUID `json:"usergroupIds,omitempty"`
TenantID uuid.UUID `json:"tenant,omitempty"`
ExternalID uuid.UUID `json:"externalId,omitempty"`
ExternalIDType string `json:"externalIdType,omitempty"`
Scopes []string `json:"scope,omitempty"`
Admin bool `json:"admin,omitempty"`
Raw string `json:"-"`
jwt.StandardClaims
}

Expand Down

0 comments on commit 77fe2b5

Please sign in to comment.