mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
OAuth: Fix forwarding id token to the data source (#43204)
This commit is contained in:
@@ -127,6 +127,11 @@ func (s *Service) handleQueryData(ctx context.Context, user *models.SignedInUser
|
||||
if s.oAuthTokenService.IsOAuthPassThruEnabled(ds) {
|
||||
if token := s.oAuthTokenService.GetCurrentOAuthToken(ctx, user); token != nil {
|
||||
req.Headers["Authorization"] = fmt.Sprintf("%s %s", token.Type(), token.AccessToken)
|
||||
|
||||
idToken, ok := token.Extra("id_token").(string)
|
||||
if ok && idToken != "" {
|
||||
req.Headers["X-ID-Token"] = idToken
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user