2

I turn to you because I'm going mad with Fr3dldap bundle on Symfony2.

I think I have config it well because in the log, I see that the user is found on ldap but just after this information it says that Authentication request failed: Bad credentials.

I used FOSUserbundle with it but I really don't know what I'm missing here.

Is the error of bad credentials come from the fr3dldap config or fosUserBundle or just something else?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
  • if the username is correct than this just means that the password is not. – hakre Apr 03 '15 at 15:12
  • Thanks for your reply but I'm sure it's good – Thomas graveleine Apr 03 '15 at 15:13
  • Then debug the authentication request. You can look in there with a step debugger like xdebug, – hakre Apr 03 '15 at 15:16
  • I see in Chrome with the resquest on login_check that :_csrf_token:someToken _username: GoodUserName _password:goodPassword Is it possible that it come from the token? – Thomas graveleine Apr 03 '15 at 15:21
  • I did read your question that the LDAP returns bad credentials. But the browser is not talking to the LDAP, right? – hakre Apr 03 '15 at 15:35
  • Yes you right I tried to debug with xdebug but it seems I don't config correctly because I can't stop on any breakpoint yet – Thomas graveleine Apr 03 '15 at 15:37
  • Most IDEs have a setting that they automatically stop at the very beginning. Such as a global first breakpoint. Try trouble-shooting with that feature. – hakre Apr 03 '15 at 15:45
  • After a long weekend I continue to investigate and I see that in the load UserByUsername methof on the LdapUserProvider class that the username is well set, that I have the salt field set with some value but that the password field is empty and the plainPassword is null so I assume that the problem come here does it? So my question remains what did I miss? – Thomas graveleine Apr 07 '15 at 07:36
  • Well, at least you've found the culprit. Did you manage to get the step-debugger to run? – hakre Apr 07 '15 at 08:22
  • Very good, the way to go. Just work along your findings into the rabbit hole. E.g. what is the role of the salt field. Why is it expected that plainPassword is empty. Etc. pp. – hakre Apr 07 '15 at 08:31
  • I think that the role of the salt is to crypt the password right but in the security.yml I have this : `DUPONT\UserBundle\Entity\User: plaintext` – Thomas graveleine Apr 07 '15 at 08:36
  • The salt is about hashing the password - not encrypting it.This is a difference I beg to make. I'm not good with SF2 .yml configuration, so I can't tell you about the meaning of that. What I see is, even you set it, the plain one (by the name of the field) is not set. So by the specs, which is the correct configuration name to set plan passwords for ldap authentication in the adapter? – hakre Apr 07 '15 at 08:53
  • I really don't know I thought it was what I set but now I completely lost – Thomas graveleine Apr 07 '15 at 08:58
  • OK I have something new I think I made a mistakes when I configure the fr3dldapBundle I set a username and a password directly here but I think this two informations has to be set when I try to log on and I saw when I debug That when I try to log on it use directly the UserAuthentificationProvider of Symfony and not the one of Fr3dldap which set the username and password but now I don't know how to ride off this provider witch is not in my config.yml – Thomas graveleine Apr 07 '15 at 13:48
  • Did you get this working? I'm looking at old posts now... – Alvin Bunk May 26 '16 at 21:31

0 Answers0