- Author:
- erikwright
- Posted:
- January 15, 2010
- Language:
- Python
- Version:
- 1.1
- Score:
- 2 (after 2 ratings)
This simple class allows you to use django-digest (http://bitbucket.org/akoha/django-digest/) with Piston.
1 2 3 4 5 6 7 8 9 10 11 12 | from django_digest import HttpDigestAuthenticator
class HttpDigestAuthentication(object):
def __init__(self):
self._authenticator = HttpDigestAuthenticator()
def is_authenticated(self, request):
return self._authenticator.authenticate(request)
def challenge(self):
return self._authenticator.build_challenge_response()
|
More like this
- LazyPrimaryKeyRelatedField by LLyaudet 6 days, 3 hours ago
- CacheInDictManager by LLyaudet 6 days, 10 hours ago
- MYSQL Full Text Expression by Bidaya0 1 week ago
- Custom model manager chaining (Python 3 re-write) by Spotted1270 1 week, 6 days ago
- Django Standard API Response Middleware for DRF for modern frontend easy usage by Denactive 4 weeks, 1 day ago
Comments
Thanks a lot, could you please provide a short explanation how to integrate it? Thank you!
#
I tried it this way now:
but no authentication is required. Any ideas?
#
Works now - I had the credentials in the cache...
#
works
#
Please login first before commenting.