Welcome Guest, Not a member yet? Register   Sign In
HTTP digest authentication with Phil Sturgeon's rest client failing
#1

[eluser]jpcody[/eluser]
Hey folks, this is almost certainly user error.

I'm trying to use Phil Sturgeon's HTTP client library in order to authenticate my app with an existing HTTP digest API. i don't seem to be able to get anything other than a 401, and I'm in a bit over my head.

I"ve been var_dumping left and right and can't seem to find the info I'm looking for. Here's my most basic code, which I can't get past.

Code:
$this->load->library('rest', array(
           'server' => 'base_url_to_api_server',
           'http_user' => md5('user_id_here'),
           'http_pass' => md5('user_pass_here'),
           'http_auth' => 'digest'
        ));
        
        $response = $this->rest->get($api_url);
        
        echo $response;

But all I'm getting is a 401. I'm expecting some sort of challenge back from the server, from which I can construct a response and try another GET.

Am i just on another planet?




Theme © iAndrew 2016 - Forum software by © MyBB