From cb3c85991937a4d515dd762b4c05fb95378cd197 Mon Sep 17 00:00:00 2001 From: Daniel Stanton Date: Wed, 25 Jan 2017 13:20:51 +0000 Subject: [PATCH] KnoxTokenAuthentication won't exist unless REST_USE_KNOX --- rest_auth/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rest_auth/views.py b/rest_auth/views.py index eec6822..84b2609 100644 --- a/rest_auth/views.py +++ b/rest_auth/views.py @@ -156,7 +156,8 @@ class LogoutAllView(APIView): Accepts/Returns nothing. """ - authentication_classes = (KnoxTokenAuthentication,) + if getattr(settings, 'REST_USE_KNOX', False): + authentication_classes = (KnoxTokenAuthentication,) permission_classes = (IsAuthenticated,) def get(self, request, *args, **kwargs):