can i use .htaccess for a web service authentication?

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 15
Joined: Mon Apr 16, 2012 2:15 am
Location: Netherlands

Tue Mar 12, 2013 2:05 am

Yes, you can!

Some interesting info about the security of htaccess:

Straight from Apache's documentation:
The most common method is Basic, and this is the method implemented by mod_auth_basic. It is important to be aware, however, that Basic authentication sends the password from the client to the server unencrypted. This method should therefore not be used for highly sensitive data, unless accompanied by mod_ssl. Apache supports one other authentication method: AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Most recent browsers support Digest authentication.

php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Tue Mar 12, 2013 8:55 pm

Yes, .htaccess can be used for authorization and authentication.

Post Reply