@@ -69,7 +69,6 @@ def __init__(
6969 expiry : int ,
7070 custom_claims_in_access_token_payload : Dict [str , Any ],
7171 time_created : int ,
72- tenant_id : str ,
7372 ):
7473 self .session_handle : str = session_handle
7574 self .user_id : str = user_id
@@ -79,7 +78,6 @@ def __init__(
7978 str , Any
8079 ] = custom_claims_in_access_token_payload
8180 self .time_created : int = time_created
82- self .tenant_id : str = tenant_id
8381
8482
8583class ReqResInfo :
@@ -135,7 +133,6 @@ def __init__(self):
135133 @abstractmethod
136134 async def create_new_session (
137135 self ,
138- tenant_id : str ,
139136 user_id : str ,
140137 access_token_payload : Optional [Dict [str , Any ]],
141138 session_data_in_database : Optional [Dict [str , Any ]],
@@ -386,7 +383,6 @@ def __init__(
386383 user_data_in_access_token : Optional [Dict [str , Any ]],
387384 req_res_info : Optional [ReqResInfo ],
388385 access_token_updated : bool ,
389- tenant_id : str ,
390386 ):
391387 self .recipe_implementation = recipe_implementation
392388 self .config = config
@@ -399,7 +395,6 @@ def __init__(
399395 self .user_data_in_access_token = user_data_in_access_token
400396 self .req_res_info : Optional [ReqResInfo ] = req_res_info
401397 self .access_token_updated = access_token_updated
402- self .tenant_id = tenant_id
403398
404399 self .response_mutators : List [ResponseMutator ] = []
405400
@@ -441,10 +436,6 @@ async def merge_into_access_token_payload(
441436 def get_user_id (self , user_context : Optional [Dict [str , Any ]] = None ) -> str :
442437 pass
443438
444- @abstractmethod
445- def get_tenant_id (self , user_context : Optional [Dict [str , Any ]] = None ) -> str :
446- pass
447-
448439 @abstractmethod
449440 def get_access_token_payload (
450441 self , user_context : Optional [Dict [str , Any ]] = None
@@ -637,14 +628,13 @@ def get_value_from_payload(
637628 """Gets the value of the claim stored in the payload"""
638629
639630 async def build (
640- self ,
641- user_id : str ,
642- tenant_id : str ,
643- user_context : Optional [Dict [str , Any ]] = None ,
631+ self , user_id : str , user_context : Optional [Dict [str , Any ]] = None
644632 ) -> JSONObject :
645633 if user_context is None :
646634 user_context = {}
647- value = await resolve (self .fetch_value (user_id , tenant_id , user_context ))
635+
636+ # TODO: change this to tenant_id
637+ value = await resolve (self .fetch_value (user_id , "pass-tenant-id" , user_context ))
648638
649639 if value is None :
650640 return {}
0 commit comments