+1  A: 

You could give the bhLDAPAuthPlugin a try?

Stephen Melrose
it's not what i need
Radu Dragomir
+1  A: 

You can do that by writing your own authentication callable for sfDoctrineGuardPlugin (if you're using Doctrine). I'll quote plugins' README here:

Check the user password with an external method

If you don't want to store the password in the database because you already have a LDAP server, a .htaccess file or if you store your passwords in another table, you can provide your own checkPassword callable (static method or function) in app.yml:

all:
  sf_guard_plugin:
    check_password_callable: [MyLDAPClass, checkPassword]

When symfony will call the $this->getUser()->checkPassword() method, it will call your method or function. Your function must takes 2 parameters, the first one is the username and the second one is the password. It must returns true or false. Here is a template for such a function:

function checkLDAPPassword($username, $password)
{
  $user = LDAP::getUser($username);
  if ($user->checkPassword($password))
  {
    return true;
  }
  else
  {
    return false;
  }
}
develop7
But is there a way to automatically login the user using the credentials already provided by the user at windows logon?
Radu Dragomir
AFAIK, no, there isn't. Only right way for me is to create filter similar to `sfGuardBasicSecurityFilter` which will log you in automatically as soon as he notices windows logon-related request headers.
develop7