Symfony user authentication using Active Directory
- by Radu Dragomir
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.