updated web select
This commit is contained in:
@@ -296,6 +296,7 @@ def authentication_token_check_post(
|
||||
"domain": domain or "",
|
||||
"eys-ext": f"{str(uuid.uuid4())}",
|
||||
"token": token,
|
||||
"tz": tz or "GMT+3",
|
||||
}
|
||||
if not domain or not language:
|
||||
return JSONResponse(
|
||||
@@ -303,10 +304,15 @@ def authentication_token_check_post(
|
||||
status_code=status.HTTP_406_NOT_ACCEPTABLE,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
if AuthHandlers.LoginHandler.authentication_check_token_valid(access_token=token):
|
||||
return JSONResponse(
|
||||
content={"message": "MSG_0001"},
|
||||
status_code=status.HTTP_202_ACCEPTED,
|
||||
headers=headers,
|
||||
)
|
||||
return JSONResponse(
|
||||
content={},
|
||||
status_code=status.HTTP_202_ACCEPTED,
|
||||
content={"error": "EYS_0033"},
|
||||
status_code=status.HTTP_406_NOT_ACCEPTABLE,
|
||||
headers=headers,
|
||||
)
|
||||
|
||||
|
||||
@@ -601,6 +601,13 @@ class LoginHandler:
|
||||
token_dict=token_object,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def authentication_check_token_valid(cls, access_token: str) -> bool:
|
||||
redis_handler = RedisHandlers()
|
||||
if redis_handler.get_object_from_redis(access_token=access_token):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
class PasswordHandler:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user