/ Published in: PHP
URL: http://www.refactory.org/s/add_http_authentication_to_an_application_with_filter/view/latest
From refactory.org
httpAuthFilter adds single-user application-wide HTTP authentication.
Expand |
Embed | Plain Text
<?php class httpAuthFilter extends sfFilter { public function execute($filterChain) { if($this->isFirstCall()) { ($_SERVER['PHP_AUTH_USER'] == sfConfig::get('app_auth_username') && $_SERVER['PHP_AUTH_PW'] == sfConfig::get('app_auth_password')) == false) { $this->sendHttpAuthHeaders(); } } $filterChain->execute(); } public function sendHttpAuthHeaders() { } }
You need to login to post a comment.
