1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/aeneria_ynh.git synced 2024-09-03 18:06:15 +02:00
aeneria_ynh/sources/patches/app-00-ldap-auth.patch

36 lines
1.2 KiB
Diff
Raw Normal View History

2020-11-26 18:47:34 +01:00
diff --git a/config/packages/security.yaml b/config/packages/security.yaml
index 9ce714b..eb38efd 100644
--- a/config/packages/security.yaml
+++ b/config/packages/security.yaml
@@ -20,6 +20,10 @@ security:
provider: app_user_provider
authenticators:
- App\Security\LoginFormAuthenticator
+ http_basic_ldap:
+ provider: app_user_provider
+ service: yunohost.ldap
+ dn_string: "uid={email},ou=users,dc=yunohost,dc=org"
logout:
path: app_logout
target: app_login
diff --git a/config/services.yaml b/config/services.yaml
index bd2a89b..af2f525 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -22,4 +22,13 @@ services:
App\Twig\:
resource: '../src/Twig'
- tags: ['twig.extension', 'container.hot_path']
\ No newline at end of file
+ tags: ['twig.extension', 'container.hot_path']
+
+ yunohost.ldap:
+ class: Symfony\Component\Ldap\Ldap
+ arguments: ['@yunohost.ldap.adapter']
+
+ yunohost.ldap.adapter:
+ class: Symfony\Component\Ldap\Adapter\ExtLdap\Adapter
+ arguments:
+ - host: "localhost"