【问题标题】:How to implement oAuth in Django with Tastipie如何使用 Tastipie 在 Django 中实现 oAuth
【发布时间】:2013-01-11 20:05:44
【问题描述】:

如何使用 Tastipie API 框架在 django 中实现 oAuth。

【问题讨论】:

    标签: django oauth tastypie


    【解决方案1】:

    Tastypie 允许您使用 OAuthAuthentication 类进行身份验证。

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

    使用此方法,您的资源将收到访问令牌。 您需要django-oauth-plus,它为您提供获取用户访问令牌的完整功能。

    【讨论】:

      猜你喜欢
      • 2021-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-07
      • 1970-01-01
      • 2017-09-26
      • 2013-03-08
      相关资源
      最近更新 更多