From 740ac7438855f08c2d69ffa0e026fa4af905f33d Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Thu, 5 Jan 2017 22:32:09 -0600 Subject: [PATCH] Support JSON Web Tokens. --- bikeshop_project/bikeshop/settings/base.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bikeshop_project/bikeshop/settings/base.py b/bikeshop_project/bikeshop/settings/base.py index 186a6a6..3c66131 100644 --- a/bikeshop_project/bikeshop/settings/base.py +++ b/bikeshop_project/bikeshop/settings/base.py @@ -167,5 +167,12 @@ REST_FRAMEWORK = { # or allow read-only access for unauthenticated users. 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' - ] + ], + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.SessionAuthentication', + 'rest_framework.authentication.BasicAuthentication', + 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', + ), } + +DATE_INPUT_FORMATS = ['iso-8601']