Browse Source

Support JSON Web Tokens.

feature/bike-tracking
Drew Larson 8 years ago
parent
commit
740ac74388
  1. 9
      bikeshop_project/bikeshop/settings/base.py

9
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']

Loading…
Cancel
Save