New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with ldap compare password with sf3 #2251

Closed
jfsenechal opened this Issue Oct 7, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@jfsenechal
Copy link

jfsenechal commented Oct 7, 2016

Hi,
I'm trying to configure ldap with fosuserbundle but I have an error :
User Warning: Expected known_string to be a string, NULL given

[http://i.stack.imgur.com/y9gyh.png]

My config files :

security.yml

`providers:
fos_userbundle:
id: fos_user.user_provider.username

users_ldap:
    ldap:
        service: ldap
        base_dn: "OU=USERS,DC=domain,DC=be"
        search_dn: "CN=ps,OU=apps,DC=domain,DC=be"
        search_password: password
        default_roles: ROLE_USER
        uid_key: sAMAccountName
chain_provider:
    chain :
        providers: [users_ldap, fos_userbundle]

encoders:
Symfony\Component\Security\Core\User\User: plaintext
AcSecurityBundle\Entity\User: sha512

firewalls:

secured_area:
    pattern:    ^/
    anonymous: true
    provider: chain_provider
    form_login:
        csrf_token_generator: security.csrf.token_manager
        use_referer: true
    form_login_ldap:
        service: ldap
        use_referer: true
    logout: true`

service.yml

services: ldap: class: 'Symfony\Component\Ldap\LdapClient' arguments: - ldap.domain.be # host - 636 # port - 3 # version - true # SSL - false # TLS

What's wrong ?
Thanks

@jfsenechal

This comment has been minimized.

Copy link

jfsenechal commented Oct 12, 2016

I have resolve error message "Expected known_string to be a string, NULL given"

I have replace

Symfony\Component\Security\Core\User\User: plaintext

By

Symfony\Component\Security\Core\User\User: bcrypt

@XWB

This comment has been minimized.

Copy link
Member

XWB commented Nov 22, 2016

👍

@XWB XWB closed this Nov 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment