Refactor authentication system (#2602)

Make auth configuration available via UI, remove FOSUserBundle and SAML-Bundle dependency
This commit is contained in:
Kevin Papst
2021-06-10 15:34:13 +02:00
committed by GitHub
parent 286b63e2c8
commit 7f20cb045c
155 changed files with 5590 additions and 1802 deletions

View File

@@ -512,12 +512,21 @@ class Configuration implements ConfigurationInterface
$node
->addDefaultsIfNotSet()
->children()
->booleanNode('registration')
->booleanNode('login')
->defaultTrue()
->end()
->booleanNode('registration')
->defaultFalse()
->end()
->booleanNode('password_reset')
->defaultTrue()
->end()
->integerNode('password_reset_retry_ttl')
->defaultValue(7200)
->end()
->integerNode('password_reset_token_ttl')
->defaultValue(86400)
->end()
->end()
;
@@ -670,6 +679,9 @@ class Configuration implements ConfigurationInterface
$node
->addDefaultsIfNotSet()
->children()
->booleanNode('activate')
->defaultFalse()
->end()
->arrayNode('connection')
->addDefaultsIfNotSet()
->children()
@@ -767,13 +779,13 @@ class Configuration implements ConfigurationInterface
->end()
->validate()
->ifTrue(static function ($v) {
return null !== $v['connection']['host'] && !\extension_loaded('ldap');
return $v['activate'] && !\extension_loaded('ldap');
})
->thenInvalid('LDAP is activated, but the LDAP PHP extension is not loaded.')
->end()
->validate()
->ifTrue(static function ($v) {
return null !== $v['connection']['host'] && empty($v['user']['baseDn']);
return $v['activate'] && empty($v['user']['baseDn']);
})
->thenInvalid('The "ldap.user.baseDn" config must be set if LDAP is activated.')
->end()