Search Results

Search found 2 results on 1 pages for 'nathangaskin'.

Page 1/1 | 1 

  • HTTP Digest Authentication Fails With URL Parameters (CakePHP)

    - by NathanGaskin
    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!

    Read the article

  • Creating a RESTful service in CakePHP

    - by NathanGaskin
    I'm attempting to create a RESTful service in CakePHP but I've hit a bit of a brick wall. I've enabled the default RESTful routing using Router::mapResources('users') and Router::parseExtensions(). This works well if I make a GET request, and returns some nicely formatted XML. So far so good. The problem is if I want to make a POST or PUT request. CakePHP doesn't seem to be able to read the data from the request. At the moment my add(), edit() and delete() actions don't contain any logic, they're simply setting $this-data to the view. I'm testing with the following cURL command: curl -v -d "<user><username>blahblah</username><password>blahblah</password>" http://localhost/users.xml --header 'content-type: text/xml' Which only returns a 404 header. If I remove the --header parameter then it returns the view but no data is set. It feels like I'm missing something obvious here. Any ideas?

    Read the article

1