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

Fixes #45938
pull/45534/head^2
Marcus Efraimsson 3 years ago committed by GitHub
parent f5705522aa
commit 843e587a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      docs/sources/developers/plugins/add-authentication-for-data-source-plugins.md

@ -291,16 +291,15 @@ 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"))
var (
tokenType = token[0]
accessToken = token[1]
)
// ...
}
token := strings.Fields(req.Headers["Authorization"])
var (
tokenType = token[0]
accessToken = token[1]
)
for _, q := range req.Queries {
// ...
}
}
```

Loading…
Cancel
Save