mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-01-11 11:50:27 +01:00
Merge pull request #485 from icovada/token_authentication
feat(api): add token authentication
This commit is contained in:
@@ -70,6 +70,7 @@ INSTALLED_APPS = [
|
||||
"apps.api.apps.ApiConfig",
|
||||
"cachalot",
|
||||
"rest_framework",
|
||||
"rest_framework.authtoken",
|
||||
"drf_spectacular",
|
||||
"django_cotton",
|
||||
"apps.rules.apps.RulesConfig",
|
||||
@@ -433,6 +434,11 @@ REST_FRAMEWORK = {
|
||||
"apps.api.permissions.NotInDemoMode",
|
||||
"rest_framework.permissions.DjangoModelPermissions",
|
||||
],
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||
'rest_framework.authentication.BasicAuthentication',
|
||||
'rest_framework.authentication.SessionAuthentication',
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
],
|
||||
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
|
||||
"PAGE_SIZE": 10,
|
||||
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
|
||||
|
||||
Reference in New Issue
Block a user