Simple 2-legged OAuth authentication model for django tastypie.
Python
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit ahead, 1 commit behind gregbayer:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README.md

README.md

About

django-tastypie-two-legged-oauth is a simple 2-legged OAuth authentication model for Django Tastypie.

This nearly an exact copy of gregbayer/django-piston-two-legged-oauth, an OAuth connector for django-piston.

Dependencies:

Adapted from example:

Related discussions:

Example

# resources.py

from tastypie.resources import ModelResource
from tastypie.authorization import DjangoAuthorization
from django.contrib.auth.models import User
from authentication import TwoLeggedOAuthAuthentication

class UserResource(ModelResource):
	class Meta:
   		queryset = User.objects.all()
    	resource_name = 'users'
    	excludes = ['email', 'password', 'is_active', 'is_staff', 'is_superuser']
    	authorization = DjangoAuthorization()
    	authentication = TwoLeggedOAuthAuthentication()