Reputation: 12149
I'm trying to test if my authentication code is working by testing it against a password protected website. How can I use the built in Apache server on the mac to create a test website so that I can test the connection:didReceiveAuthenticationChallenge
delegate method?
Are there any blogs/resources that show this?
Upvotes: 0
Views: 338
Reputation: 1900
Do you mean the simple HTTP authentication? You can setup an Apache and create a .htaccess file in the protected directory with content
AuthType Basic
AuthName "Protected Area"
AuthUserFile .htpasswd
require valid-user
The file .htpasswd needs to have user and password info in syntax user:crypt(password) using the output generated by crypt.
Upvotes: 1