Auth: Use authn.Service for all tests (#72921)

* Dashboards: Fix tests when authn broker is enabled.
StarService was not configured for tests, the call was guarded by !c.IsSignedIn

* Change default to be anon user to match expectations from tests

* OAuth: rewrite tests to work with authn.Service

* Setup template renderer by default

* Extract cookie options from cfg instead of relying on global variables

* Fix test to work with authn service

* Middleware: rewrite auth tests

* Remvoe session cookie if we cannot refresh access token
This commit is contained in:
Karl Persson
2023-08-09 08:54:52 +02:00
committed by GitHub
parent 5eef8291e2
commit 144e4887ee
19 changed files with 431 additions and 1722 deletions
+6 -5
View File
@@ -968,11 +968,12 @@ var skipStaticRootValidation = false
func NewCfg() *Cfg {
return &Cfg{
Target: []string{},
Logger: log.New("settings"),
Raw: ini.Empty(),
Azure: &azsettings.AzureSettings{},
RBACEnabled: true,
Target: []string{},
Logger: log.New("settings"),
Raw: ini.Empty(),
Azure: &azsettings.AzureSettings{},
RBACEnabled: true,
AuthBrokerEnabled: true,
}
}