Created
February 7, 2019 14:20
-
-
Save Nek-/b9e343bb6a6dd88b2c4d27147d50b13a to your computer and use it in GitHub Desktop.
Symfony LDAP Security config example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
security: | |
providers: | |
user_provider: | |
ldap: | |
service: Symfony\Component\Ldap\Ldap | |
base_dn: "%env(LDAP_BASE_DN)%" | |
# Identifiants pour la connexion au LDAP | |
search_dn: "%env(LDAP_SEARCH_DN)%" | |
search_password: "%env(LDAP_SEARCH_PASSWORD)%" | |
# Rôle par défaut pour nos utilisateurs LDAP | |
default_roles: ROLE_USER | |
# Clé contenant notre identifiant unique | |
uid_key: uid | |
# Clé contenant le mot de passe | |
password_attribute: 'userPassword' | |
encoders: | |
Symfony\Component\Security\Core\User\User: | |
id: App\Security\LdapEncoder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment