Skip to content

Commit

Permalink
Merge pull request #405 from supertokens/mt-allowed-domains
Browse files Browse the repository at this point in the history
fix: allowed domain claim and some typos
  • Loading branch information
rishabhpoddar authored Aug 11, 2023
2 parents 3c78c0f + e9bb86f commit aa09c14
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions supertokens_python/recipe/multitenancy/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
from supertokens_python.recipe.session.claim_base_classes.primitive_array_claim import (
PrimitiveArrayClaim,
)
from supertokens_python.recipe.session.interfaces import JSONObject
from supertokens_python.recipe_module import APIHandled, RecipeModule
from supertokens_python.utils import get_timestamp_ms

from ...post_init_callbacks import PostSTInitCallbacks

Expand Down Expand Up @@ -274,26 +272,5 @@ async def fetch_value(

super().__init__("st-t-dmns", fetch_value, default_max_age_in_sec)

def get_value_from_payload(
self, payload: JSONObject, user_context: Optional[Dict[str, Any]] = None
) -> Optional[List[str]]:
_ = user_context

res = payload.get(self.key, {}).get("v")
if res is None:
return []
return res

def get_last_refetch_time(
self, payload: JSONObject, user_context: Optional[Dict[str, Any]] = None
) -> Optional[int]:
_ = user_context

res = payload.get(self.key, {}).get("t")
if res is None:
return get_timestamp_ms()

return res


AllowedDomainsClaim = AllowedDomainsClaimClass()

0 comments on commit aa09c14

Please sign in to comment.