IDToken: Add current user's Username and UID to the ID token (#90240)

* Set claims.Rest.Login from the IDService

* Add UID to the ID token
This commit is contained in:
Misi
2024-07-11 14:25:30 +02:00
committed by GitHub
parent b75276c641
commit 69c5fa8361
5 changed files with 23 additions and 4 deletions
+2
View File
@@ -96,6 +96,8 @@ func (s *Service) SignIdentity(ctx context.Context, id identity.Requester) (stri
claims.Rest.Email = id.GetEmail()
claims.Rest.EmailVerified = id.IsEmailVerified()
claims.Rest.AuthenticatedBy = id.GetAuthenticatedBy()
claims.Rest.Username = id.GetLogin()
claims.Rest.UID = id.GetUID().String()
}
token, err := s.signer.SignIDToken(ctx, claims)