BorisMorel/LdapBundle — Issue #13: Autentication
Author: rtoledof
Created: 2011-11-28 16:03:07+00:00
State: open

I have the problem to authenticate by the bundle. My problem is:
The bundle configuration is the next:
security:
providers:
ldap:
id: imag_ldap.security.user.provider

encoders:
IMAG\LdapBundle\User\LdapUser: plaintext

firewalls:
login:
pattern: ^/login$
security: false

sancionados:
pattern: ^/
security: true
form_login:
# login_path: /login
# check_path: /login_check
always_use_default_target_path: true
default_target_path: /sancionados
logout:
path: /logout
target: /login
imag_ldap: ~

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

access_control:
#Permitir a los usuarios anonimos tener acceso a la ruta de login
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/, roles: [ROLE_SCNI_ADMINISTRADORES, ROLE_SEC_UCI_SECURITY] }

imag_ldap:
client:
host: ucidc2.uci.cu
port: 389
user:
base_dn: OU=UCI Domain Users,dc=uci,dc=cu
filter: (objectClass=person)
name_attribute: samaccountname
role:
base_dn: ou=UCI Domain Groups,dc=uci,dc=cu
filter: (objectClass=group) #Optional
name_attribute: samaccountname
user_attribute: member
user_id: dn

Now when I' m enter user and password for authenticate my user the bundle I said The presented password is invalid.

This response is in any user and password entered.
I looked the travel for authenticate and detect when symfony go to authenticate user in plaintext encoder enter password for user entered and password for encoder class but encoder class not return password in the bundle and so always return invalid password.

how I can resolve this problem in the authentication?????