Symfony user authentication using Active Directory

Posted by Radu Dragomir on Stack Overflow See other posts from Stack Overflow or by Radu Dragomir
Published on 2010-03-01T14:14:59Z Indexed on 2010/04/08 8:23 UTC
Read the original article Hit count: 527

Is there a way to authenticate users in symfony apps using Active Directory? Can you please point out some documentation?

edit

What i need is to have a transparent login in my application. The user authenticates once at windows logon, then all applications should be accessed with the same credentials without being asked for the domain\username and password again.

I tried the following in a simple php script:

if (!isset($_SERVER['PHP_AUTH_USER'])) {
  header('WWW-Authenticate: Basic realm="my realm"');
  header('HTTP/1.0 401 Unauthorized');
  exit;
} else {
  echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
  echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>";
}

but then i get the authentication form popped up. Is there any way to pass the header the credentials used at windows logon?

Thanks, Radu.

© Stack Overflow or respective owner

Related posts about php

Related posts about active-directory