mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 01:16:31 -06:00
parent
45bcbff115
commit
bc9fab6f30
@ -22,7 +22,7 @@ type IDClaims struct {
|
||||
jwt.Claims
|
||||
}
|
||||
|
||||
const settingsKey = "forwardIdToken"
|
||||
const settingsKey = "forwardGrafanaIdToken"
|
||||
|
||||
func IsIDForwardingEnabledForDataSource(ds *datasources.DataSource) bool {
|
||||
return ds.JsonData != nil && ds.JsonData.Get(settingsKey).MustBool()
|
||||
|
@ -18,12 +18,12 @@ import (
|
||||
|
||||
func TestForwardIDMiddleware(t *testing.T) {
|
||||
settingWithEnabled, err := json.Marshal(map[string]any{
|
||||
"forwardIdToken": true,
|
||||
"forwardGrafanaIdToken": true,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
settingWithDisabled, err := json.Marshal(map[string]any{
|
||||
"forwardIdToken": false,
|
||||
"forwardGrafanaIdToken": false,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user