BorisMorel/LdapBundle — Issue #17: losing authentificaction AD
Author: xmontana
Created: 2012-01-19 09:19:35+00:00
State: open

Hi friends,

I had a little error. I have configurated LdapBundle againts an Active directory, so my security.yml is:

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

imag_ldap:
client:
host: ldap://ad2003.local
port: 389
version: 3
username: informat@ad2003.local
password: mypassword
referrals_enabled: 0

user:
base_dn: "DC=ad2003,DC=local"
name_attribute: sAMAccountName
role:
base_dn: "DC=ad2003,DC=local"
user_attribute: member
user_id: dn

I haven't any problem for autentificate with a AD user and password, but after some minutes in a secured route, i reload the page, I "lose" the autentification token, but username and roles are stored. Symfony 2.0.8 shows this error:

Password is not defined, pls use setPassword
500 Internal Server Error - Exception

in C:\dev\icsxrx\src\IMAG\LdapBundle\Manager\LdapManagerUser.php at line 151

And if I look in the Symfony Profiler, in the security section I see:

Username: My_user_name
Authenticated?: No
Roles: [ROLE_ADMINS_DEL_DOMINIO, ROLE_INTRA_QC_1, ROLE_INTRA_ANATOMIA_1]

Any suggestion?