Use Apache Basic Authentication with user-created form
I'm working on using mod_authz_ldap to do authentication for my application and I'm trying to avoid using the standard username/password box that Apache presents when trying to access a restricted page.
Is it possible to prevent the Apache login box from popping up and using a form within my html to post to *something* that will pass the login values to apache to perform the Basic Authentication? I've read through the documentation and I don't recall seeing anything that might work. I'm not sure if this is even possible. Thanks!! |
I'm not completely sure (90 % only) but i think that you have to manage a registered session with a script language like perl, php and cookies if you want a custom login. The basic-auth mechanism cannot be emulated by some html code.
|
Quote:
That's kind of what I figured. I wasn't sure if it was even possible. It's been a while, but I thought I may have done something like this in the past. Something like setting PHP_AUTH_USER (in PHP: $_SERVER['AUTH_PHP_USER']) equal to the user name collected from the login script and *tricking* Apache into seeing this value set when accessing a protected realm, however, I don't think that would actually work. (works in my head, just not in reality :tisk: ) Anyone else ever try something like this? |
I think this might help.
This shows you how to read the .htpasswd file from PHP.
Sorry, I had to put spaces because I'm new here. http : // koivi.com / php-http-auth / This is used with basic authentication. |
All times are GMT -5. The time now is 09:12 PM. |