mirror of
https://github.com/grafana/grafana.git
synced 2025-09-26 06:44:02 +08:00
IDToken: Add current user's DisplayName to the ID token (#90992)
Set claims.Rest.DisplayName from the IDService
This commit is contained in:
@ -98,6 +98,7 @@ func (s *Service) SignIdentity(ctx context.Context, id identity.Requester) (stri
|
|||||||
claims.Rest.AuthenticatedBy = id.GetAuthenticatedBy()
|
claims.Rest.AuthenticatedBy = id.GetAuthenticatedBy()
|
||||||
claims.Rest.Username = id.GetLogin()
|
claims.Rest.Username = id.GetLogin()
|
||||||
claims.Rest.UID = id.GetUID()
|
claims.Rest.UID = id.GetUID()
|
||||||
|
claims.Rest.DisplayName = id.GetDisplayName()
|
||||||
}
|
}
|
||||||
|
|
||||||
token, err := s.signer.SignIDToken(ctx, claims)
|
token, err := s.signer.SignIDToken(ctx, claims)
|
||||||
|
Reference in New Issue
Block a user