Maks3w / FR3DLdapBundle

This bundle integrates LDAP Authentication with any user manager (Ex: FOSUserBundle)
119 stars 77 forks source link

Error after configuring FR3DLdapBundle: security.authentication.failure_handler is abstract #105

Closed Drachenkaetzchen closed 8 years ago

Drachenkaetzchen commented 9 years ago

Hi,

I'm currently trying out the FR3DLdapBundle. However, after installation, I receive the following error when I try to run php app/console:

[Symfony\Component\DependencyInjection\Exception\RuntimeException]                                                                                         
  The definition "security.authentication.listener.form.main" has a reference to an abstract definition "security.authentication.failure_handler". Abstract  
   definitions cannot be the target of references.   

I'm a bit lost here. As soon as I remove the following configuration lines, it works again:

security:
    providers:
        r3d_ldapbundle:
            id: fr3d_ldap.security.user.provider

What are the required steps to define the security.authentication.failure_handler?

bkosborne commented 8 years ago

What did you do to resolve this?

bkosborne commented 8 years ago

Ah, looks like you just needed to add the form_login key to security configuration. This allows the default settings that form_login brings along to be loaded:

security:
    # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
    providers:
        fr3d_ldapbundle:
              id: fr3d_ldap.security.user.provider

        main:
            fr3d_ldap: ~
            form_login: ~
            anonymous: ~