https://github.com/philsturgeon/codeigniter-restserver/
I have created an api using rest server above and need to login-protect it now. I know there are two methods in the rest server 1) basic, 2) digest
I am also using rest client to test this api
$this->load->library('rest', array(
'server' => 'http://mynew/api/',
'http_user' => 'admin',
'http_pass' => '1234',
'http_auth' => 'basic', // or 'digest'
//'http_auth' => 'digest'
));
$user = $this->rest->get('listrecord', array('key' => 'mykey'), 'json');
I have $config['rest_valid_logins'] = array('admin' => '1234');
In the above code the "basic" auth works fine but when I change it to digest it says "Not Authorised". Please note when I make change here I also change config to digest too.
My understanding is that basic is not very secure? so that's why I think digest be better than it. Any ideas how do I get digest working?? thanks for your help. It maynot be codeigniter specific issue, I guess.