Auth: Extend the SAMLStrategy with entity_id (#96234)

Add the ability to specify EntityID
This commit is contained in:
Misi 2024-11-13 10:36:46 +01:00 committed by GitHub
parent acf57aa556
commit 275ee55e8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ func (s *SAMLStrategy) loadSAMLSettings() map[string]any {
section := s.settingsProvider.Section("auth.saml")
result := map[string]any{
"enabled": section.KeyValue("enabled").MustBool(false),
"entity_id": section.KeyValue("entity_id").MustString(""),
"name": section.KeyValue("name").MustString("SAML"),
"single_logout": section.KeyValue("single_logout").MustBool(false),
"allow_sign_up": section.KeyValue("allow_sign_up").MustBool(false),

View File

@ -15,6 +15,7 @@ var (
iniSAMLContent = `
[auth.saml]
enabled = true
entity_id = custom-entity-id
single_logout = true
name = "SAML Test"
allow_sign_up = true
@ -54,6 +55,7 @@ var (
expectedSAMLInfo = map[string]any{
"enabled": true,
"entity_id": "custom-entity-id",
"single_logout": true,
"allow_sign_up": true,
"auto_login": true,