Skip to content

Commit

Permalink
external_id is now the subject, preferred_username is now defined per…
Browse files Browse the repository at this point in the history
… OIDC spec
  • Loading branch information
zacharyfleck authored and theSuess committed May 9, 2024
1 parent ec7e340 commit e5594c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,19 @@ func (o *OIDCProvider) newSession(aroot string, values url.Values) *openid.Defau
return &openid.DefaultSession{
Claims: &jwt.IDTokenClaims{
Issuer: aroot,
Subject: values.Get("username"),
Subject: values.Get("external_id"),
Audience: []string{},
ExpiresAt: time.Now().Add(time.Hour * 6),
IssuedAt: time.Now(),
RequestedAt: time.Now(),
AuthTime: time.Now(),
Extra: map[string]interface{}{
"email": values.Get("email"),
"email_verified": true,
"picture": values.Get("avatar_url"),
"name": values.Get("name"),
"groups": strings.Split(values.Get("groups"), ","),
"external_id": values.Get("external_id"),
"email": values.Get("email"),
"email_verified": true,
"picture": values.Get("avatar_url"),
"name": values.Get("name"),
"groups": strings.Split(values.Get("groups"), ","),
"preferred_username": values.Get("username"),
},
},
Headers: &jwt.Headers{
Expand Down

0 comments on commit e5594c1

Please sign in to comment.