Docs: Fix typo in Forward OAuth identity for the logged-in user section (#46043)

Fixes #45938
This commit is contained in:
Marcus Efraimsson 2022-03-01 18:49:58 +01:00 committed by GitHub
parent f5705522aa
commit 843e587a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,14 +291,13 @@ When configured, Grafana will pass the user's token to the plugin in an Authoriz
```go
func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
for _, q := range req.Queries {
token := strings.Fields(q.Headers.Get("Authorization"))
token := strings.Fields(req.Headers["Authorization"])
var (
tokenType = token[0]
accessToken = token[1]
)
for _, q := range req.Queries {
// ...
}
}