Jump to content

Use Windows login on PHP Page


arunkareer

Recommended Posts

I was given a task to develop a php login page. But my boss wants me to make it more "user friendly" in a manner that they won't have to write in or remember their usernames and passwords, which they

already have too many. So he suggested to use windows login on my php login page. i.e. all the Windows User accounts that have been created & stored in the Windows can be able access it whether they have logged in or not.

 

I'm developing under Apache 2.2 & PHP 5.2.

And i know it can be done through either NTML or LDAP operations of php/apache.

But i have no clue how to do it. I have done all the searching for hours & hours. but couldnt find what i need.

It would be really gr8 if some please help me here with some exact coding that i need.

So far i got this site:

http://hubpages.com/hub/Use-Windows-Login-in-PHP-Applications

 

but i didnt work for me.

 

Link to comment
https://forums.phpfreaks.com/topic/198906-use-windows-login-on-php-page/
Share on other sites

So, IIS has a real handy way to handle integrated authentication, and that is the best way to handle it, and Microsoft recommends that you set up an ADAM (active directory application mode)  But I'm not recommending it.  With that said, you are going to have to query your server (AD) for usernames and password.  The best tool for doing this is found at: 

 

http://adldap.sourceforge.net/

http://adldap.sourceforge.net/wiki/doku.php?id=api_user_functions

 

authenticate($username,$password,$prevent_rebind=false)

 

Authenticate the username/password of a user against a domain controller.

 

If you are using Single Sign-on then you won't need to call authenticate() as you can let your Web server perform the work for you. However, in the case of single sign-on you will need to define an username and password to connect to your domain controller in the configuration.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.