Chore: AuthN/IdentitySynchronizer interface/impl compatibility wire fix (#74400)

authn/identitysynchronizer fix
This commit is contained in:
Artur Wierzbicki 2023-09-06 15:10:07 +04:00 committed by GitHub
parent 93b9f9b537
commit d50ccd6741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -42,7 +42,6 @@ import (
"github.com/grafana/grafana/pkg/services/annotations/annotationsimpl"
"github.com/grafana/grafana/pkg/services/apikey/apikeyimpl"
"github.com/grafana/grafana/pkg/services/auth/jwt"
"github.com/grafana/grafana/pkg/services/authn"
"github.com/grafana/grafana/pkg/services/authn/authnimpl"
"github.com/grafana/grafana/pkg/services/cleanup"
"github.com/grafana/grafana/pkg/services/contexthandler"
@ -348,8 +347,8 @@ var wireBasicSet = wire.NewSet(
tagimpl.ProvideService,
wire.Bind(new(tag.Service), new(*tagimpl.Service)),
authnimpl.ProvideService,
wire.Bind(new(authn.Service), new(*authnimpl.Service)),
wire.Bind(new(authn.IdentitySynchronizer), new(*authnimpl.Service)),
authnimpl.ProvideIdentitySynchronizer,
authnimpl.ProvideAuthnService,
supportbundlesimpl.ProvideService,
oasimpl.ProvideService,
wire.Bind(new(oauthserver.OAuth2Server), new(*oasimpl.OAuth2ServiceImpl)),

View File

@ -48,10 +48,14 @@ var (
)
// make sure service implements authn.Service interface
var _ authn.Service = new(Service)
func ProvideAuthnService(s *Service) authn.Service {
return s
}
// make sure service implements authn.IdentitySynchronizer interface
var _ authn.IdentitySynchronizer = new(Service)
func ProvideIdentitySynchronizer(s *Service) authn.IdentitySynchronizer {
return s
}
func ProvideService(
cfg *setting.Cfg, tracer tracing.Tracer,