Django API CSRF Issues - Need Help

2016-05-20 Thread Chris Troutner
Hey all, This is my first time posting to the group. I'm working with Bob Hagan on the Network Resource Planning (NRP) project . The platform runs on Django and he's been using the REST API app to open up ports to some of the

Re: Django API CSRF Issues - Need Help

2016-05-21 Thread Chris Troutner
nd JavaScript to interact with the Django server side API and the key to doing that is to pass in the CSRF token in a way that makes Django happy. So far, I haven't figured out how to do that. -Chris On Saturday, May 21, 2016 at 2:16:17 AM UTC-7, Daniel Roseman wrote: > > On Saturday, 2

Re: Django API CSRF Issues - Need Help

2016-05-21 Thread Chris Troutner
I linked to that page in the original posting. That page describes what we're trying to do, but there seems to be a disconnect between what is specified and what is actually happening. As near as I can tell, I have satisfied the CSRF requirements documented on that page, but I still can't seem

Re: Django API CSRF Issues - Need Help

2016-05-21 Thread Chris Troutner
I was logged in yes, but I also noticed that when I tried to get the cookie from the CMS side, it would retrieve a different CSRF token, as though I wasn't logged in. Hence the copy and paste I showed in the video. I'm trying to get this cookie plugin integrated into my code. Maybe it will have be

Re: Django API CSRF Issues - Need Help

2016-05-21 Thread Chris Troutner
ersView.js And scroll down to the approveUser function, you can see a section marked in comments labeled VIRTUAL FORM. I'm doing to same xhr.setRequestHeader('X-CSRFToken', csrftoken); instruction in Francois' example. The POST submission still results in a 403 Forbidden error. On

Re: Django API CSRF Issues - Need Help

2016-05-21 Thread Chris Troutner
That's really interesting. Hmm... Thanks for the feedback. On Sat, May 21, 2016 at 9:03 AM, Michal Petrucha < michal.petru...@konk.org> wrote: > On Sat, May 21, 2016 at 08:55:04AM -0700, Chris Troutner wrote: > > Yep, no luck. I got the cookie plugin integrated, bu