php htpasswd authentication
I am trying to get php to authenticate against my .htpasswd, however, it never finishes, but rather keeps giving me the username/password dialog
here is my code: Code:
<?php |
You don't need to use PHP to authenticate via htpasswd. Just drop a htaccess file at the top of the directory you want to protect and have it link to the htpasswd file.
|
Quote:
|
Unfortunately, "you're missing the point."
".htpasswd" is strictly for use by Apache: your (PHP or what-have-you) script will never be invoked at all unless that level of authentication is cleared. Hence, your code never has to be concerned with it. To put it another way: there is nothing that 'your code' can possibly add to it. If you want there to be another "factor," it can't have anything to do with ".htpasswd" since that is by-definition only one factor, and that factor has already been cleared. Any attempt by you to make further use of that factor ... does not introduce another factor. |
Quote:
https://www.duosecurity.com/docs/duoweb clearly 2 factor authentication is possible, the second factor would then be invoked where the echo "hello... currently is. thanks! Adam |
Here is the final code that i was able to get to work:
Code:
<?php Quote:
|
All times are GMT -5. The time now is 02:06 PM. |