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
2020-11-26 19:15:40 +01:00

32 lines
1.2 KiB
Diff

diff --git a/config/packages/security.yaml b/config/packages/security.yaml
index 15ef608..aa9425b 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: security.logout
target: security.login
diff --git a/config/services.yaml b/config/services.yaml
index 533c244..0d15678 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -70,3 +70,12 @@ services:
Aeneria\EnedisDataConnectApi\Service\DataConnectServiceInterface:
alias: Aeneria\EnedisDataConnectApi\Service\DataConnectService
+
+ yunohost.ldap:
+ class: Symfony\Component\Ldap\Ldap
+ arguments: ['@yunohost.ldap.adapter']
+
+ yunohost.ldap.adapter:
+ class: Symfony\Component\Ldap\Adapter\ExtLdap\Adapter
+ arguments:
+ - host: "localhost"