Django-tastypie checking of csrf token in requests

瀏覽次數:17 次
跳到第一則未讀訊息

Rene Zelaya

未讀,
2015年8月14日 上午10:53:492015/8/14
收件者:Django users
Hi everyone,

We have a REST API built using django-tastypie, which most of our users access through our web application. However, we do have users that make requests to the API programmatically (using the python 'requests' library, for example) and use an OAuth token to do so (we have already set up our Tastypie API to do this OAuth authentication).

How does Tastypie check for the csrf token, and does anybody have experience modifying the mechanism so that it does check it when users are in a session using the web application but does not require it if users are accessing programmatically AND have a valid OAuth token?

Thank you!

Rene
回覆所有人
回覆作者
轉寄
0 則新訊息