Maks3w/FR3DLdapBundle — Issue #4: Unrecognized options "base_dn" under "fr3d_ldap.user"
Author: javibravo
Created: 2012-01-25 12:15:15+00:00
State: open

Hello,

First at all tell you it can be a very useful tool.

I'm testing your Bundle to use it in a Symfony Project and I have a problem. I have configured the bundle as you say in the bundle description, but when I access the application shows me the following error:

InvalidConfigurationException: Unrecognized options "base_dn" under "fr3d_ldap.user"

I can find solve it. ¿Can you help me?

In my security.yml file:

security:
providers:
chain_provider:
providers: [fos_userbundle, fr3d_ldapbundle]

fr3d_ldapbundle:
id: fr3d_ldap.security.user.provider

fos_userbundle:
id: fos_user.user_manager

firewalls:
main:
pattern: ^/
fr3d_ldap: ~
form_login:
always_use_default_target_path: true
default_target_path: /profile
logout: true
anonymous: true

encoders:
ITER\CanalinkManagerBundle\Entity\User: plaintext

factories:
- "%kernel.root_dir%/../src/FR3D/LdapBundle/Resources/config/security_factories.xml"

access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY}
- { path: ^/, roles: ROLE_USER}

role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN

In my config.yml file:

fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: ITER\CanalinkManagerBundle\Entity\User

fr3d_ldap:
client:
host: 192.168.22.192
port: 389 # Optional
version: 3 # Optional

user:
base_dn: ou=Users, dc=mydomain, dc=es
filter: (&(ObjectClass=Person))
attributes: # Expecify ldap attributes mapping [ldap attribute, user object method]
- { ldap_attr: uid, user_method: setUsername } # Default
# - { ldap_attr: cn, user_method: setName } # Optional
# - { ldap_attr: ..., user_method: ... } # Optional
# service:
# user_manager: fos_user.user_manager # Overrides default user manager

Thank you!
Javi.