Yep, no luck. I got the cookie plugin integrated, but it didn't make any
difference. The problem isn't with the *retrieval* of the CSRF token, it's
with the *submission*.

If you bring up this code:
https://github.com/christroutner/rpiovn/blob/unstable/public/js/app/views/NRPUsersView.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 Sat, May 21, 2016 at 8:31 AM, Chris Troutner <chris.trout...@gmail.com>
wrote:

> 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 better luck at retrieving the CSRF token for my logged in user.
>
> On Sat, May 21, 2016 at 8:25 AM, bobhaugen <bob.hau...@gmail.com> wrote:
>
>> Chris, I understood you were logged into the django system when you tried
>> these posts. Correct? I thought that would cover authentication thru DRF.
>> But I am also a noob to Javascript client post -> DRF server.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/7FkB_HE446I/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/aba6b122-5eff-4e67-8237-37ab5df90f69%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/aba6b122-5eff-4e67-8237-37ab5df90f69%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4b19yYZmJSus6r3u%2Bg120UMAV2fT50pnPUS%2Bi57mqDL-8O_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to