Add Media-Token beside access token

Media-Token can be used only to access the content, but unable to modify user data
This commit is contained in:
Gergely Hegedus 2023-03-27 19:07:29 +03:00
parent 0a71a6c840
commit 1f06c40c4c
31 changed files with 516 additions and 762 deletions

View file

@ -1,4 +1,5 @@
from backend.flask_project import create_app
from backend.data.data_models import Session
default_test_config = {
"DATABASE_PATH": "testdb",
@ -10,4 +11,14 @@ default_test_config = {
"MAX_OTP_LENGTH": 16,
"MAX_TOKEN_LENGTH": 200,
"KEY_LENGTH": 30,
}
}
def create_test_session(user_id, access_token = '', media_token = '', refresh_token = '', access_expires_at = 1, refresh_expires_at = 1):
return Session(
user_id = user_id,
access_token = access_token,
media_token = media_token,
refresh_token = refresh_token,
access_expires_at = access_expires_at,
refresh_expires_at = refresh_expires_at
)