13

Scenario:

I have a area of a website that needs to be secure and accessible when offsite. I want the user to enter the username and password used to login at work in a web form. The form will send the username and password to authenticate it. If it works the user is logged in.

I need to use a form not a pop-up login box. PHP is preferred but I'm flexible. Any ideas to point me in the right direction?


My employer has a few secure areas they have set up that uses the "pop-up box". For what I need to accomplish I need to use a web form.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
dcp3450
  • 10,959
  • 23
  • 58
  • 110

4 Answers4

9

Try LDAP

I've written intranet web applications that use the local windows username and password to authenticate and LDAP is by far the best solution.

Levi Hackwith
  • 9,232
  • 18
  • 64
  • 115
  • Trying to see if we use LDAP here. Most of the technology they have in place is fairly old. – dcp3450 Mar 23 '10 at 16:44
  • We're LDAP compliant so it seems I'll go about it that way. Now I have to learn how to authenticate the username and password via LDAP using php. :) – dcp3450 Mar 23 '10 at 17:18
  • This may help with that: http://articles.techrepublic.com.com/5100-10878_11-5032010.html or just google 'php ldap authentication' – Levi Hackwith Mar 23 '10 at 17:41
  • 1
    @dcp3450 Did my answer work for you? Or do you require more information? It's been two years, after all. – Levi Hackwith Sep 05 '12 at 16:06
  • It's been 4 more years and I need to know, if this still works – Peon Apr 12 '16 at 12:02
0

If you are using LDAP at work, go with that, if not, well you have to access it thru .NET.

Since there are several but not fully reliable .NET implementations for PHP, I would recommend using a WebService, which PHP would consume, that will pass the user and pass - encrypted would be nice - to it, and it will return if the credentials are valid or not.

jpabluz
  • 1,200
  • 6
  • 16
0

You should be able to use LDAP, in your case it is most likely Windows Active Directory via IIS. There are php packages out there to interact with various types of LDAP implementations. Here is a link:
http://php.net/manual/en/book.ldap.php

SDGuero
  • 487
  • 1
  • 4
  • 12
0

use this http://pear.php.net/package/Auth and tie it in to ldap authentication at the back-end. of especial interest to you would be the Auth::setShowLogin method...

kguest
  • 3,804
  • 3
  • 29
  • 31