Re: Authentication
| From: | Chad Robinson | Date: | Fri, 27 Jul 2007 22:15:52 +0000 |
| Subject: | Re: Authentication | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-259722@lists.php.net to get a copy of this message | ||
Dan Shirah wrote:
My application is only used within my company. I want to pull the NT Authenticated user that is logged in, cross reference that user with what I have pulled from ldap and verify the user's name is valid. If the username is valid I will assign it to a variable and use that variable to store the name of the user that submitted the requests. Yes, I am trying to get a single sign on method if possible. $_SERVER['REMOTE_ADDR'] works in bringing back the IP Address of the computer I'm kaing the request from, but $_SERVER['REMOTE_USER'] does not return anything. There's an ActiveX component floating around that will pull this information from the user's PC and make it available so Javascript can get it (and then pass it on to you). You have to instruct each user's browser to consider your site in the trusted zone, but it works fine after that. This is how Microsoft does SSO in their own browser.I didn't actually read too much into this link, but it might get you going: http://archives.devshed.com/forums/php-windows-119/newb-get-username-that-is-currently-logged-in-to-windows-1765301.html Basically, having the user put your site into the 'Trusted' zone allows Javascript to call out to things, which it can't do with default security settings. After you get it, then you have to pass it to the server. If you want to get this automatically, make the entry page (index/default/whatever) run this javascript work, then at the tail end of it redirect the user to the login page using a GET or POST query to pass in the username. If it fails to get the username the login page can then just ask for it. At least, maybe it will give you enough to Google now. Regards, Chad