'Enforce CSRF validation for session based authentication.'

def enforce_csrf(self, request):

    reason = CSRFCheck().process_view(request, None, (), {})
    if reason:
        raise AuthenticationFailed(('CSRF    Failed:    %s' % reason))
