client frontend added

This commit is contained in:
2025-05-19 23:12:23 +03:00
parent 5f7cb35ccc
commit fdf9d2edb8
507 changed files with 40655 additions and 510 deletions

View File

@@ -27,16 +27,14 @@ class TokenProvider:
raise ValueError("Invalid user type")
@classmethod
def get_dict_from_redis(cls, token: Optional[str] = None, user_uu_id: Optional[str] = None) -> Union[TokenDictType, List[TokenDictType]]:
def get_dict_from_redis(
cls, token: Optional[str] = None, user_uu_id: Optional[str] = None
) -> Union[TokenDictType, List[TokenDictType]]:
"""
Retrieve token object from Redis using token and user_uu_id
"""
token_to_use, user_uu_id_to_use = token or "*", user_uu_id or "*"
list_of_token_dict, auth_key_list = [], [
cls.AUTH_TOKEN,
token_to_use,
user_uu_id_to_use,
]
list_of_token_dict, auth_key_list = [], [cls.AUTH_TOKEN, token_to_use, user_uu_id_to_use, "*"]
if token:
result = RedisActions.get_json(list_keys=auth_key_list, limit=1)
if first_record := result.first:
@@ -47,9 +45,7 @@ class TokenProvider:
for all_record in all_records:
list_of_token_dict.append(cls.convert_redis_object_to_token(all_record))
return list_of_token_dict
raise ValueError(
"Token not found in Redis. Please check the token or user_uu_id."
)
raise ValueError("Token not found in Redis. Please check the token or user_uu_id.")
@classmethod
def retrieve_application_codes(cls, page_url: str, token: TokenDictType):