done with JWT
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user