Hello, I am trying to replicate the behaviour of the /challenge/cookie_form login using AJAX. I'm using the TiddlyWebLoginPlugin and TiddlyWebAdaptor (modified to send tiddlyweb_redirect value as well).
My problem is that, although the XMLHttpRequest appears to do an identical POST to the cookie_form form submit, the response is always 401 Unauthorized. You can validate this: 1) go to http://burningchrome.com:8090/bags/IMP/tiddlers.wiki 2) open up backstage 3) select login 4) login with user=jonl password=jonl 5) see the response in Firebug console as 401 Unauthorized Compare this to the successful login: 1) go to http://burningchrome.com:8090/challenge/cookie_form 2) login with user=jonl password=jonl 3) see the successful request in Firebug console I've looked in the cookie_form.py to see if it's checking the referer request header, but it doesn't appear to be. Everything about the two requests seems the same, except that the TiddlyWiki XMLHttpRequest has a few extra request headers: Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: TiddlyWiki 2.4.2 (beta 1) Referer: http://burningchrome.com:8090/bags/IMP/tiddlers.wiki Content-Length: 48 Cookie: txtMainTab=Timeline; chkBackstage=true Pragma: no-cache Cache-Control: no-cache Any help much appreciated! Thanks, J. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/TiddlyWikiDev?hl=en -~----------~----~----~----~------~----~------~--~---
