grafana-plugin-sdk-go icon indicating copy to clipboard operation
grafana-plugin-sdk-go copied to clipboard

Add PluginAppClientSecret to request config

Open andresmgot opened this issue 1 year ago • 2 comments

What this PR does / why we need it:

Adds a helper method to obtain a PluginAppClientSecret. One difference from other settings, is that this one fallsback to the way Grafana exposes the setting in previous versions (so plugins using this helper does not need to bump the minimal Grafana version, which will expose this setting in the config with https://github.com/grafana/grafana/pull/85187).

An example of how this used can be found here: https://github.com/grafana/grafana-plugin-examples/pull/259

I also deletes the package experimental/oauthtokenretriever since I believe this is not used anywhere.

Which issue(s) this PR fixes:

Part of https://github.com/grafana/grafana-plugin-examples/issues/258

Special notes for your reviewer:

andresmgot avatar Mar 26 '24 15:03 andresmgot

Interesting! I'll need to update the rbac plugin example to use these changes

gamab avatar Mar 26 '24 16:03 gamab

@andresmgot to clarify. With that approach is the token passed with every request? Or is it still passed once to the app, but set in the plugin context?

gamab avatar Mar 27 '24 09:03 gamab

With that approach is the token passed with every request?

That's correct @gamab

andresmgot avatar Apr 01 '24 09:04 andresmgot