BorisMorel/LdapBundle — pull request #99 by natelenart (2013-11-13 17:16:59+00:00)
Title: Removed LdapToken in favor of UsernamePasswordToken

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | yes

I just upgraded from 2.1.0 to master. I kept getting redirect loop on login, with the following message in my `app/logs/dev.log`:

```
[2013-11-13 08:15:38] security.INFO: Authentication exception occurred; redirecting to authentication entry point (No Authentication Provider found for token of class "IMAG\LdapBundle\Authentication\Token\LdapToken".) [] []
```

Updating `LdapAuthenticationProvider::supports` to additionally include `LdapToken` also fixed the issue. (It used to handle this but was removed when you did the refactor for the chain provider, commit d056d47151eeb1f5720d773c10e404c653ece97d back in March.)

But, since this is the only place `LdapToken` is being used, why even have it? This PR drops `LdapToken` and creates a `UsernamePasswordToken` after successful bind instead. Any issues with this?