server/python/django2/renkanmanager/auth.py
author durandn
Thu, 21 Apr 2016 15:18:19 +0200
changeset 605 13d355fd09bf
parent 589 0ae11aa255a3
child 665 69d13e7dd286
permissions -rw-r--r--
updated uri to allow optional trailing slash on single resource URIs (django automatic redirects don't carry over the Authorization header that can sometimes be needed, for instance with OAuth)

from rest_framework.authentication import SessionAuthentication 

class CsrfExemptSessionAuthentication(SessionAuthentication):
    """
        Session authentication class to use with Renkan client, as it does not provide a csrf token
    """
    
    
    def enforce_csrf(self, request):
        return