Auth: Use SSO settings service to load social connectors + refactor (#79005)

* Refactor to prevent cyclic dependencies

* Move list authorization to the API layer

* Init connectors using the SSO settings service in case the ssoSettingsApi feature toggle is enabled

* wip, need to handle the cyclic dep

* Remove cyclic dependency

* Align tests + refactor

* Move back OAuthInfo to social

* Delete pkg/login/social/constants

* Move reloadable registration to the social providers

* Rename connectors.Error to connectors.SocialError
This commit is contained in:
Misi
2023-12-08 11:20:42 +01:00
committed by GitHub
parent 58c5e5c9dc
commit 50f4e78a39
38 changed files with 1173 additions and 1028 deletions

View File

@ -31,6 +31,7 @@ import (
"github.com/grafana/grafana/pkg/infra/usagestats/statscollector"
"github.com/grafana/grafana/pkg/infra/usagestats/validator"
"github.com/grafana/grafana/pkg/login/social"
"github.com/grafana/grafana/pkg/login/social/socialimpl"
"github.com/grafana/grafana/pkg/middleware/csrf"
"github.com/grafana/grafana/pkg/middleware/loggermw"
apiregistry "github.com/grafana/grafana/pkg/registry/apis"
@ -256,9 +257,9 @@ var wireBasicSet = wire.NewSet(
testdatasource.ProvideService,
ldapapi.ProvideService,
opentsdb.ProvideService,
social.ProvideService,
socialimpl.ProvideService,
influxdb.ProvideService,
wire.Bind(new(social.Service), new(*social.SocialService)),
wire.Bind(new(social.Service), new(*socialimpl.SocialService)),
tempo.ProvideService,
loki.ProvideService,
graphite.ProvideService,