updated authentication

This commit is contained in:
puckoprutt 2025-02-18 20:54:35 +01:00
parent 65140a146e
commit c4ae82a692

View File

@ -61,7 +61,8 @@ INSTALLED_APPS = [
'knox',
# my shit
'user'
'options',
'users'
]
MIDDLEWARE = [
@ -101,14 +102,14 @@ REST_FRAMEWORK = {
"rest_framework.authentication.SessionAuthentication"
],
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
'DEFAULT_PAGINATION_CLASS': 'puckodjango.rest.pagination.MediumPagination',
'DEFAULT_PAGINATION_CLASS': 'settings.puckignation.MediumPagination',
'PAGE_SIZE': 10
}
# DRF-Spectacular
SPECTACULAR_SETTINGS = {
"TITLE": "Puckoprutt Pathfinder API",
"DESCRIPTION": "A interactive web API for pathfinder stuffs and giggles.",
"TITLE": "Puckoprutt API",
"DESCRIPTION": "A interactive web API for stuffs and giggles.",
"VERSION": "0.1.0",
"SERVE_PUBLIC": False,
"SERVE_INCLUDE_SCHEMA": False,
@ -129,7 +130,7 @@ REST_KNOX = {
"SECURE_HASH_ALGORITHM": "hashlib.sha3_512",
"AUTH_TOKEN_CHARACTER_LENGTH": 64,
"TOKEN_TTL": timedelta(days=4, hours=12),
"USER_SERIALIZER": "puckodjango.rest.users.serializer.Pucko_User_Serializer",
"USER_SERIALIZER": "users.serializer.Pucko_User_Serializer",
"TOKEN_LIMIT_PER_USER": 3,
"AUTO_REFRESH": False,
"AUTO_REFRESH_MAX_TTL": None,
@ -177,10 +178,12 @@ WSGI_APPLICATION = 'settings.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
'NAME': BASE_DIR / 'puckoprutt.sqlite3',
}
}
# Standard user model
AUTH_USER_MODEL = "users.Puckopruttis"
# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators