Skip to content
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

With symfony 2.5 #131

Open
nicolasbonnet opened this issue Sep 2, 2014 · 1 comment
Open

With symfony 2.5 #131

nicolasbonnet opened this issue Sep 2, 2014 · 1 comment

Comments

@nicolasbonnet
Copy link

Hello, i have a problem with my app.

For a symfony version 2.5, what can i use to have a ldap connection ?
Moreover, I try to associate FOSUserBundle to it.

So i configure my app with LdapUserProvider in your doc "Using a custom user manager with LDAP authentication".

I follow it, i also add general configuration with that in my config.yml
/******************************************************************************

Configuration LDAP

imag_ldap:
client:
host: host.org
port: 389
username: myReader # Optional
password: MDP # Optional
user:
base_dn: ou=one, dc=two, dc=three
name_attribute: uid
user_class: MDP\UserBundle\Entity\User
******************************************************************************/

i configure services.xml like that :
/******************************************************************************








%imag_ldap.model.user_class%



******************************************************************************/

my security.yml
/*******************************************************************************
security:
encoders:
MDP\UserBundle\Entity\User: plaintext

providers:
        multiples:
            chain:
                 providers: [ldap, fos_userbundle]
        ldap:
            id: imag_ldap.security.user.provider
        fos_userbundle:
            id: fos_user.user_provider.username

firewalls:
    dev:
        pattern: ^/(_(profiler|wdt))/
        security: false
    main:
        pattern: .*
        form_login:
            provider: multiples
            csrf_provider: form.csrf_provider
            login_path: fos_user_security_login
            check_path: fos_user_security_check
            default_target_path: /
            use_forward: false
            remember_me: true

        logout:       true
        anonymous:    true
        switch_user: true
    secured_area:
        pattern: ^/
        anonymous: ~
        imag_ldap:
            provider: multiples
        logout:
            path: logout

imag_ldap:
client:
host: MDP.siege
port: 389
username: myReader# Optional
password: MDP # Optional

user:
base_dn: ou=one, dc=two, dc=three
name_attribute: uid
role:
base_dn: ou=one, dc=two, dc=three
name_attribute: cn
user_attribute: member
user_id: username
****************************************************************************/

and add it in my config.yml with a link.

I do too my LdapUserProvider.php

One particulary, i must remove method ->doPass() because she doesn't exist ...
What i do wrong ?

do you have a solution please ?

@BorisMorel
Copy link
Owner

Hy,

I need to evolve to support Symfony 2.5.

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

No branches or pull requests

2 participants