SaveExternalService (OAuth) on plugin load (#69764)

This commit is contained in:
Andres Martinez Gotor
2023-06-26 16:38:43 +02:00
committed by GitHub
parent f436364f9b
commit 4ff0abd0d1
16 changed files with 221 additions and 40 deletions

View File

@ -17,6 +17,7 @@ import (
"github.com/grafana/grafana/pkg/plugins/backendplugin/pluginextensionv2"
"github.com/grafana/grafana/pkg/plugins/backendplugin/secretsmanagerplugin"
"github.com/grafana/grafana/pkg/plugins/log"
"github.com/grafana/grafana/pkg/plugins/oauth"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/util"
)
@ -53,6 +54,8 @@ type Plugin struct {
AngularDetected bool
ExternalService *oauth.ExternalService
Renderer pluginextensionv2.RendererPlugin
SecretsManager secretsmanagerplugin.SecretsManagerPlugin
client backendplugin.Plugin
@ -150,6 +153,9 @@ type JSONData struct {
// Backend (Datasource + Renderer + SecretsManager)
Executable string `json:"executable,omitempty"`
// Oauth App Service Registration
ExternalServiceRegistration *oauth.ExternalServiceRegistration `json:"externalServiceRegistration,omitempty"`
}
func ReadPluginJSON(reader io.Reader) (JSONData, error) {