done with JWT

This commit is contained in:
lennyaiko
2025-04-03 18:05:44 +01:00
parent 01b433e7e3
commit 5ff1f2c8bf
2 changed files with 13 additions and 9 deletions
+6 -2
View File
@@ -11,6 +11,10 @@ from flask_jwt_extended import (
create_refresh_token,
get_jwt_identity,
)
from app.config import Config
USERNAME = Config.BASIC_AUTH_USERNAME
PASSWORD = Config.BASIC_AUTH_PASSWORD
class AuthorizationService(BaseService):
@@ -39,8 +43,8 @@ class AuthorizationService(BaseService):
### TODO: Access Database credentials here ###
if (
validated_data["username"] != "username"
or validated_data["password"] != "password"
validated_data["username"] != USERNAME
or validated_data["password"] != PASSWORD
):
return ResponseHelper.unauthorized(message="Invalid credentials")