feat: command to set auth method
This commit is contained in:
@@ -5,46 +5,29 @@ security:
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
providers:
|
||||
users_in_memory: { memory: null }
|
||||
app_user_provider:
|
||||
app_local:
|
||||
entity:
|
||||
class: App\User\Framework\Entity\User
|
||||
property: email
|
||||
|
||||
custom_ldap_provider:
|
||||
app_ldap:
|
||||
id: App\User\Framework\Security\LdapUserProvider
|
||||
|
||||
app_ldap_provider:
|
||||
ldap:
|
||||
service: Symfony\Component\Ldap\Ldap
|
||||
base_dn: '%env(LDAP_BASE_DN)%'
|
||||
search_dn: '%env(LDAP_BIND_USER)%'
|
||||
search_password: '%env(LDAP_BIND_PASS)%'
|
||||
default_roles: ROLE_USER
|
||||
uid_key: uid
|
||||
extra_fields: ['mail', 'cn', 'givenname', 'sn', 'displayname', 'initials']
|
||||
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
lazy: true
|
||||
provider: custom_ldap_provider
|
||||
# form_login:
|
||||
# login_path: app_login
|
||||
# check_path: app_login
|
||||
# enable_csrf: true
|
||||
logout:
|
||||
path: app_logout
|
||||
provider: app_ldap
|
||||
form_login_ldap:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
enable_csrf: true
|
||||
service: Symfony\Component\Ldap\Ldap
|
||||
dn_string: '%env(LDAP_DN_STRING)%'
|
||||
# where to redirect after logout
|
||||
# target: app_any_route
|
||||
logout:
|
||||
path: app_logout
|
||||
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
|
||||
Reference in New Issue
Block a user