How to implement oAuth in Django with Tastipie

荒凉一梦 提交于 2019-12-11 16:33:36

问题


How to implement oAuth in django with Tastipie API framework.


回答1:


Tastypie allows you to use OAuthAuthentication class for your authentication.

class UserResource(ModelResource):
class Meta:
    queryset = User.objects.all()
    authentication = OAuthAuthentication()

With this method your resource will expect to receive access token. You need django-oauth-plus, which gives you full functionality to get user access token.



来源:https://stackoverflow.com/questions/14274738/how-to-implement-oauth-in-django-with-tastipie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!