i want to use this on my AdminController.php
so in public init() i wrote this :
$config = array(
'accept_schemes' => 'basic digest',
'realm' => 'My Web Site',
'digest_domains' => '/members_only /my_account',
'nonce_timeout' => 3600,
);
$adapter = new Zend_Auth_Adapter_Http($config);
$basicResolver = new Zend_Auth_Adapter_Http_Resolver_File();
$basicResolver->setFile(APPLICATION_PATH.'\basicPasswd.txt');
$adapter->setBasicResolver($basicResolver);
$adapter->setRequest($this->_request);
$adapter->setResponse($this->_response);
$result = $adapter->authenticate();
if (!$result->isValid()) {
throw new Zend_Exception("You Dont have access to admin area");
} else {
die('u have access');
}
*and in my password file :
admin:827ccb0eea8a706c4c34a16891f84e7b
*the above pass is md5 of '12345'
the problem is it request for password again and again also when u type
the correct user password.
:(
i think it cannot match the userpass from password file
how to fix it?
--
________________
Sincerely
Sina Miandashti
MuSicBasE.ir & InvisionPower.ir Admin
没有评论:
发表评论