This module provides a middleware for HMAC signature Django views. It's simply designed to check that a client is entitled to access routes, based on the fact that it must possess a copy of the secret key.
- HMAC Middleware
- HMAC View decorators
- Multiple keys for more services
- Service restricted access
class SignedView(View):
@decorators.auth
def get(self, request):
return HttpResponse("for all services")
@decorators.auth(only=['userservice'])
def post(self, request):
return HttpResponse("Only for user service")
To run all tests
docker run -it -v $PWD:/src -w /src ikalnitsky/pythonista tox