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.