Django authentication for django-piston
This authenticate together django.contrib.auth.models.User like django normal login does.
- authentication
- piston
This authenticate together django.contrib.auth.models.User like django normal login does.
Django-piston have two build-in authentication handlers, the HttpBasicAuthentication and OAuthAuthentication. This snippet give another choice which use the django auth. It can support ajax and normal request.
Support authentication https://github.com/jpulgarin/django-tokenapi for django-piston
Shows difference between two json like python objects. May help to test json response, piston API powered sites... Shows properties, values from first object that are not in the second. Example: import simplejson # or other json serializer first = simplejson.loads('{"first_name": "Poligraph", "last_name": "Sharikov",}') second = simplejson.loads('{"first_name": "Poligraphovich", "pet_name": "Sharik"}') df = Diff(first, second) df.difference is ["path: last_name"] Diff(first, second, vice_versa=True) gives you difference from both objects in the one result. df.difference is ["path: last_name", "path: pet_name"] Diff(first, second, with_values=True) gives you difference of the values strings.
This snippet for Piston allows you to offer a choice of authentication methods to clients.
This simple class allows you to use django-digest (http://bitbucket.org/akoha/django-digest/) with Piston.