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
+9
View File
@@ -12,6 +12,7 @@ import (
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/plugins/backendplugin"
"github.com/grafana/grafana/pkg/plugins/log"
"github.com/grafana/grafana/pkg/plugins/oauth"
"github.com/grafana/grafana/pkg/plugins/repo"
"github.com/grafana/grafana/pkg/plugins/storage"
)
@@ -422,3 +423,11 @@ func (f *FakePluginFileStore) File(ctx context.Context, pluginID, filename strin
}
return nil, nil
}
type FakeOauthService struct {
Result *oauth.ExternalService
}
func (f *FakeOauthService) RegisterExternalService(ctx context.Context, name string, svc *oauth.ExternalServiceRegistration) (*oauth.ExternalService, error) {
return f.Result, nil
}