Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allowed domain claim and some typos #405

Merged
merged 1 commit into from
Aug 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Loading