@@ -12,6 +12,7 @@ import (
12
12
"github.com/stretchr/testify/require"
13
13
14
14
"github.com/grafana/grafana/pkg/plugins"
15
+ "github.com/grafana/grafana/pkg/plugins/auth"
15
16
"github.com/grafana/grafana/pkg/plugins/backendplugin"
16
17
"github.com/grafana/grafana/pkg/plugins/config"
17
18
"github.com/grafana/grafana/pkg/plugins/log"
@@ -23,7 +24,6 @@ import (
23
24
"github.com/grafana/grafana/pkg/plugins/manager/registry"
24
25
"github.com/grafana/grafana/pkg/plugins/manager/signature"
25
26
"github.com/grafana/grafana/pkg/plugins/manager/sources"
26
- "github.com/grafana/grafana/pkg/plugins/oauth"
27
27
"github.com/grafana/grafana/pkg/plugins/plugindef"
28
28
"github.com/grafana/grafana/pkg/plugins/pluginscdn"
29
29
"github.com/grafana/grafana/pkg/services/featuremgmt"
@@ -555,7 +555,7 @@ func TestLoader_Load_ExternalRegistration(t *testing.T) {
555
555
Signature : plugins .SignatureStatusUnsigned ,
556
556
Module : "/public/plugins/grafana-test-datasource/module.js" ,
557
557
BaseURL : "/public/plugins/grafana-test-datasource" ,
558
- ExternalService : & oauth .ExternalService {
558
+ ExternalService : & auth .ExternalService {
559
559
ClientID : "client-id" ,
560
560
ClientSecret : "secretz" ,
561
561
PrivateKey : "priv@t3" ,
@@ -576,8 +576,8 @@ func TestLoader_Load_ExternalRegistration(t *testing.T) {
576
576
}
577
577
578
578
l := newLoaderWithOpts (t , cfg , loaderDepOpts {
579
- oauthServiceRegistry : & fakes.FakeOauthService {
580
- Result : & oauth .ExternalService {
579
+ authServiceRegistry : & fakes.FakeAuthService {
580
+ Result : & auth .ExternalService {
581
581
ClientID : "client-id" ,
582
582
ClientSecret : "secretz" ,
583
583
PrivateKey : "priv@t3" ,
@@ -1468,7 +1468,7 @@ func TestLoader_Load_NestedPlugins(t *testing.T) {
1468
1468
1469
1469
type loaderDepOpts struct {
1470
1470
angularInspector angularinspector.Inspector
1471
- oauthServiceRegistry oauth .ExternalServiceRegistry
1471
+ authServiceRegistry auth .ExternalServiceRegistry
1472
1472
backendFactoryProvider plugins.BackendFactoryProvider
1473
1473
}
1474
1474
@@ -1484,7 +1484,7 @@ func newLoader(t *testing.T, cfg *config.Cfg, reg registry.Service, proc process
1484
1484
return ProvideService (pipeline .ProvideDiscoveryStage (cfg , finder .NewLocalFinder (false ), reg ),
1485
1485
pipeline .ProvideBootstrapStage (cfg , signature .DefaultCalculator (cfg ), assets ),
1486
1486
pipeline .ProvideValidationStage (cfg , signature .NewValidator (signature .NewUnsignedAuthorizer (cfg )), angularInspector , sigErrTracker ),
1487
- pipeline .ProvideInitializationStage (cfg , reg , lic , backendFactory , proc , & fakes.FakeOauthService {}, fakes .NewFakeRoleRegistry ()),
1487
+ pipeline .ProvideInitializationStage (cfg , reg , lic , backendFactory , proc , & fakes.FakeAuthService {}, fakes .NewFakeRoleRegistry ()),
1488
1488
terminate )
1489
1489
}
1490
1490
@@ -1503,9 +1503,9 @@ func newLoaderWithOpts(t *testing.T, cfg *config.Cfg, opts loaderDepOpts) *Loade
1503
1503
angularInspector = angularinspector .NewStaticInspector ()
1504
1504
}
1505
1505
1506
- oauthServiceRegistry := opts .oauthServiceRegistry
1507
- if oauthServiceRegistry == nil {
1508
- oauthServiceRegistry = & fakes.FakeOauthService {}
1506
+ authServiceRegistry := opts .authServiceRegistry
1507
+ if authServiceRegistry == nil {
1508
+ authServiceRegistry = & fakes.FakeAuthService {}
1509
1509
}
1510
1510
1511
1511
backendFactoryProvider := opts .backendFactoryProvider
@@ -1516,7 +1516,7 @@ func newLoaderWithOpts(t *testing.T, cfg *config.Cfg, opts loaderDepOpts) *Loade
1516
1516
return ProvideService (pipeline .ProvideDiscoveryStage (cfg , finder .NewLocalFinder (false ), reg ),
1517
1517
pipeline .ProvideBootstrapStage (cfg , signature .DefaultCalculator (cfg ), assets ),
1518
1518
pipeline .ProvideValidationStage (cfg , signature .NewValidator (signature .NewUnsignedAuthorizer (cfg )), angularInspector , sigErrTracker ),
1519
- pipeline .ProvideInitializationStage (cfg , reg , lic , backendFactoryProvider , proc , oauthServiceRegistry , fakes .NewFakeRoleRegistry ()),
1519
+ pipeline .ProvideInitializationStage (cfg , reg , lic , backendFactoryProvider , proc , authServiceRegistry , fakes .NewFakeRoleRegistry ()),
1520
1520
terminate )
1521
1521
}
1522
1522
0 commit comments