Auth: Extend the SAMLStrategy with entity_id (#96234)
Add the ability to specify EntityID
This commit is contained in:
@@ -33,6 +33,7 @@ func (s *SAMLStrategy) loadSAMLSettings() map[string]any {
|
|||||||
section := s.settingsProvider.Section("auth.saml")
|
section := s.settingsProvider.Section("auth.saml")
|
||||||
result := map[string]any{
|
result := map[string]any{
|
||||||
"enabled": section.KeyValue("enabled").MustBool(false),
|
"enabled": section.KeyValue("enabled").MustBool(false),
|
||||||
|
"entity_id": section.KeyValue("entity_id").MustString(""),
|
||||||
"name": section.KeyValue("name").MustString("SAML"),
|
"name": section.KeyValue("name").MustString("SAML"),
|
||||||
"single_logout": section.KeyValue("single_logout").MustBool(false),
|
"single_logout": section.KeyValue("single_logout").MustBool(false),
|
||||||
"allow_sign_up": section.KeyValue("allow_sign_up").MustBool(false),
|
"allow_sign_up": section.KeyValue("allow_sign_up").MustBool(false),
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ var (
|
|||||||
iniSAMLContent = `
|
iniSAMLContent = `
|
||||||
[auth.saml]
|
[auth.saml]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
entity_id = custom-entity-id
|
||||||
single_logout = true
|
single_logout = true
|
||||||
name = "SAML Test"
|
name = "SAML Test"
|
||||||
allow_sign_up = true
|
allow_sign_up = true
|
||||||
@@ -54,6 +55,7 @@ var (
|
|||||||
|
|
||||||
expectedSAMLInfo = map[string]any{
|
expectedSAMLInfo = map[string]any{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
"entity_id": "custom-entity-id",
|
||||||
"single_logout": true,
|
"single_logout": true,
|
||||||
"allow_sign_up": true,
|
"allow_sign_up": true,
|
||||||
"auto_login": true,
|
"auto_login": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user