Extended JWT expiry time

This commit is contained in:
Fergal Moran
2015-07-17 23:58:16 +01:00
parent 60907f2db0
commit 013d0f37be
2 changed files with 6 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
from django.conf.urls import patterns, url, include
from rest_framework import permissions
from rest_framework.permissions import IsAuthenticated
from rest_framework.routers import DefaultRouter
from rest_framework.views import APIView
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
from api import views, auth, helpers
from api.auth import FacebookView
@@ -21,11 +23,12 @@ router.register(r'genre', views.GenreViewSet, base_name='genre')
class DebugView(APIView):
permission_classes = (permissions.AllowAny,)
permission_classes = (IsAuthenticated, )
authentication_classes = (JSONWebTokenAuthentication, )
def post(self, request, format=None):
return Response({
'status': 'Hello',
'status': request.user.first_name,
'message': 'Sailor'
}, status=status.HTTP_200_OK)