mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
For the SSO to work, the user must exist in Wallabag first. It then rely on the provided HTTP basic with LDAP backend.
37 lines
1.5 KiB
Diff
37 lines
1.5 KiB
Diff
--- a/app/config/services.yml 2016-05-25 18:09:56.374914445 +0200
|
|
+++ b/app/config/services.yml 2016-05-25 18:07:38.775042951 +0200
|
|
@@ -36,3 +36,7 @@
|
|
arguments: ["@session"]
|
|
tags:
|
|
- { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
|
|
+
|
|
+ yunohost.ldap:
|
|
+ class: Symfony\Component\Ldap\LdapClient
|
|
+ arguments: ["localhost"]
|
|
--- a/app/config/security.yml 2016-05-25 18:09:46.814645164 +0200
|
|
+++ b/app/config/security.yml 2016-05-25 18:07:38.775042951 +0200
|
|
@@ -11,6 +11,14 @@
|
|
entity: { class: WallabagUserBundle:User, property: username }
|
|
fos_userbundle:
|
|
id: fos_user.user_provider.username
|
|
+ yunohost_users:
|
|
+ ldap:
|
|
+ service: yunohost.ldap
|
|
+ base_dn: ou=users,dc=yunohost,dc=org
|
|
+ search_dn:
|
|
+ search_password:
|
|
+ filter: (&(uid={username})(objectClass=posixAccount))
|
|
+ default_roles: ROLE_USER
|
|
|
|
# the main part of the security, where you can set up firewalls
|
|
# for specific sections of your app
|
|
@@ -36,6 +44,9 @@
|
|
|
|
secured_area:
|
|
pattern: ^/
|
|
+ http_basic_ldap:
|
|
+ service: yunohost.ldap
|
|
+ dn_string: "uid={username},ou=users,dc=yunohost,dc=org"
|
|
form_login:
|
|
provider: fos_userbundle
|
|
csrf_token_generator: security.csrf.token_manager
|