Skip to content

Commit

Permalink
Add username claim
Browse files Browse the repository at this point in the history
  • Loading branch information
loafoe committed Oct 13, 2023
1 parent 2fd0f55 commit c33edb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions connector/hsdp/extend_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ func (c *HSDPConnector) ExtendPayload(scopes []string, payload []byte, cdata []b
if cd.User.GivenName != "" {
originalClaims["name"] = fmt.Sprintf("%s %s", cd.User.GivenName, cd.User.FamilyName)
}
// Inject username
if cd.Introspect.Username != "" {
originalClaims["username"] = cd.Introspect.Username
}
if len(orgSubs) > 0 {
subs := strings.Join(orgSubs, ":")
origSub := originalClaims["sub"].(string)
Expand Down

0 comments on commit c33edb3

Please sign in to comment.