Skip to content

thisissoon/djangohmac

Folders and files

NameName
Last commit message
Last commit date
Dec 17, 2019
Oct 28, 2015
Jan 5, 2016
Sep 11, 2015
Sep 11, 2015
Sep 11, 2015
Jan 5, 2016
Sep 11, 2015
Sep 11, 2015
Oct 14, 2015
Oct 28, 2015
Jan 5, 2016
Oct 15, 2015
Oct 1, 2015
Jan 26, 2016
Dec 17, 2019

Repository files navigation

Django-HMAC

circle downloads version license docs

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.

Key features:

  • HMAC Middleware
  • HMAC View decorators
  • Multiple keys for more services
  • Service restricted access

Small example

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")

Dev

To run all tests

docker run -it -v $PWD:/src -w /src ikalnitsky/pythonista tox

About

Django HMAC middleware class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2