CodeIgniter Forums
HTTP header-based login? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: HTTP header-based login? (/showthread.php?tid=19458)

Pages: 1 2


HTTP header-based login? - El Forum - 06-09-2009

[eluser]Phil Sturgeon[/eluser]
Looks like the nc and qop values are empty. Is this an issue? It seems that $digest_parts['response'] and $validResponse do not match because of it, so I modified the $matches loop to:

Code:
foreach($matches as $match)
        {
            $digest_parts[$match[1]] = $match[2] ? $match[2] : $match[3];
        }

Now every part of the $validResponse string is being created but they still do not match.

Quote:Array
(
[username] => user
[realm] => REST API
[nonce] => 4a2e4a050e23d
[uri] => /codeigniter/index.php/example_api/users
[response] => afe6cfa344fda5e95c3b46b3678d9ab4
[opaque] => aba3d4b49c454e1974970e7b5514b001
[qop] => auth
[nc] => 00000002
[cnonce] => 17283d8659a3ee1d
)

digest responce: afe6cfa344fda5e95c3b46b3678d9ab4
assumed responce: 514c9cef71c32192edd59d77435a3c36