I want to do a http auth with zend, I read that article http://framework.zend.com/manual/en/zend.auth.adapter.http.html but I dont think its valuable (why the heck are the password taken from an external file...?). I know it can simply be done with headers:
header('WWW-Authenticate: Basic realm=sdfsdf');
header('HTTP/1.0 401 Unauthorized');
die;
but since we are using Zend, I would like to convert it:
$response->setHeader('WWW-Authenticate', 'Basic realm="asda"', true);
$response->setHeader('Status', '401 Unauthorized', true);
it wont accept it, nothing happens. Even if it works, I cant use die();
right after this. Can somebody show a way out?