Commit 4f79bde7 by Chif Gergő

Configure token authentication

parent 04d2fa9b
Pipeline #783 failed with stages
in 3 minutes 14 seconds
...@@ -37,6 +37,7 @@ INSTALLED_APPS = [ ...@@ -37,6 +37,7 @@ INSTALLED_APPS = [
"django.contrib.messages", "django.contrib.messages",
"django.contrib.staticfiles", "django.contrib.staticfiles",
"rest_framework", "rest_framework",
"rest_framework.authtoken",
"djoser", "djoser",
"rest_framework_swagger", "rest_framework_swagger",
"corsheaders", "corsheaders",
...@@ -106,6 +107,11 @@ AUTH_PASSWORD_VALIDATORS = [ ...@@ -106,6 +107,11 @@ AUTH_PASSWORD_VALIDATORS = [
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"}, {"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
] ]
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework.authentication.TokenAuthentication',
),
}
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/ # https://docs.djangoproject.com/en/2.1/topics/i18n/
......
...@@ -6,4 +6,6 @@ exclude = ...@@ -6,4 +6,6 @@ exclude =
recircle/interface_openstack recircle/interface_openstack
# No need to check migrations # No need to check migrations
migrations migrations
# Settings module
settings
max-line-length = 100 max-line-length = 100
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment