HTTP Digest Authentication Fails With URL Parameters (CakePHP)

Posted by NathanGaskin on Stack Overflow See other posts from Stack Overflow or by NathanGaskin
Published on 2010-05-14T10:26:44Z Indexed on 2010/05/17 9:00 UTC
Read the original article Hit count: 324

Filed under:
|
|
|
|

I have a RESTful API set up and working with CakePHP using mapResources() and parseExtensions(). Authentication is handled by CakePHP's security component using HTTP Digest Authentication.

Everything works fine, unless I add parameters to the url, in the form:

http://example.com/locations.xml?distance=4

Which causes the authentication to always fail. Any ideas?


Edit: This seems to be an issue with the regex in parseDigestAuthData(). There's a semi-fix here: http://old.nabble.com/paginator-conflicts-with-Security-%3ErequireLogin---td16301573.html which now allows me to use the format:

http://example.com/locations/index/distance:4/.xml

But that's not RESTful and doesn't look all that pretty. Still, getting closer!

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about rest