Skip to content

Commit a2e7064

Browse files
committed
adding dev-v0.23.1 tag to this commit to ensure building
1 parent a87c84a commit a2e7064

20 files changed

+93
-59
lines changed

html/supertokens_python/ingredients/emaildelivery/types.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ <h3>Ancestors</h3>
214214
</dd>
215215
<dt id="supertokens_python.ingredients.emaildelivery.types.EmailDeliveryInterface"><code class="flex name class">
216216
<span>class <span class="ident">EmailDeliveryInterface</span></span>
217+
<span>(</span><span>*args, **kwds)</span>
217218
</code></dt>
218219
<dd>
219220
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/ingredients/smsdelivery/types.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ <h3>Ancestors</h3>
210210
</dd>
211211
<dt id="supertokens_python.ingredients.smsdelivery.types.SMSDeliveryInterface"><code class="flex name class">
212212
<span>class <span class="ident">SMSDeliveryInterface</span></span>
213+
<span>(</span><span>*args, **kwds)</span>
213214
</code></dt>
214215
<dd>
215216
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/recipe/jwt/recipe_implementation.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ <h1 class="title">Module <code>supertokens_python.recipe.jwt.recipe_implementati
113113
pattern = r&#34;,?\s*max-age=(\d+)(?:,|$)&#34;
114114
max_age_header = re.match(pattern, cache_control)
115115
if max_age_header is not None:
116-
validity_in_secs = int(max_age_header.group(1))
117116
try:
118-
validity_in_secs = int(validity_in_secs)
117+
validity_in_secs = int(max_age_header.group(1))
119118
except Exception:
120119
validity_in_secs = DEFAULT_JWKS_MAX_AGE
121120

@@ -198,9 +197,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
198197
pattern = r&#34;,?\s*max-age=(\d+)(?:,|$)&#34;
199198
max_age_header = re.match(pattern, cache_control)
200199
if max_age_header is not None:
201-
validity_in_secs = int(max_age_header.group(1))
202200
try:
203-
validity_in_secs = int(validity_in_secs)
201+
validity_in_secs = int(max_age_header.group(1))
204202
except Exception:
205203
validity_in_secs = DEFAULT_JWKS_MAX_AGE
206204

@@ -281,9 +279,8 @@ <h3>Methods</h3>
281279
pattern = r&#34;,?\s*max-age=(\d+)(?:,|$)&#34;
282280
max_age_header = re.match(pattern, cache_control)
283281
if max_age_header is not None:
284-
validity_in_secs = int(max_age_header.group(1))
285282
try:
286-
validity_in_secs = int(validity_in_secs)
283+
validity_in_secs = int(max_age_header.group(1))
287284
except Exception:
288285
validity_in_secs = DEFAULT_JWKS_MAX_AGE
289286

html/supertokens_python/recipe/passwordless/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
160160
<h2 class="section-title" id="header-functions">Functions</h2>
161161
<dl>
162162
<dt id="supertokens_python.recipe.passwordless.init"><code class="name flex">
163-
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule]</span>
163+
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[InputOverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[EmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[SMSTemplateVars], None] = None) ‑> Callable[[AppInfo], RecipeModule]</span>
164164
</code></dt>
165165
<dd>
166166
<div class="desc"></div>

html/supertokens_python/recipe/passwordless/interfaces.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ <h3>Methods</h3>
10891089
</dd>
10901090
<dt id="supertokens_python.recipe.passwordless.interfaces.CreateCodePostOkResult"><code class="flex name class">
10911091
<span>class <span class="ident">CreateCodePostOkResult</span></span>
1092-
<span>(</span><span>device_id: str, pre_auth_session_id: str, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']")</span>
1092+
<span>(</span><span>device_id: str, pre_auth_session_id: str, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]")</span>
10931093
</code></dt>
10941094
<dd>
10951095
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/recipe/passwordless/recipe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
425425
<dl>
426426
<dt id="supertokens_python.recipe.passwordless.recipe.PasswordlessRecipe"><code class="flex name class">
427427
<span>class <span class="ident">PasswordlessRecipe</span></span>
428-
<span>(</span><span>recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
428+
<span>(</span><span>recipe_id: str, app_info: AppInfo, contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", ingredients: PasswordlessIngredients, override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
429429
</code></dt>
430430
<dd>
431431
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
@@ -785,7 +785,7 @@ <h3>Static methods</h3>
785785
</details>
786786
</dd>
787787
<dt id="supertokens_python.recipe.passwordless.recipe.PasswordlessRecipe.init"><code class="name flex">
788-
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
788+
<span>def <span class="ident">init</span></span>(<span>contact_config: ContactConfig, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[OverrideConfig, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None)</span>
789789
</code></dt>
790790
<dd>
791791
<div class="desc"></div>

html/supertokens_python/recipe/passwordless/utils.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
311311
</details>
312312
</dd>
313313
<dt id="supertokens_python.recipe.passwordless.utils.validate_and_normalise_user_input"><code class="name flex">
314-
<span>def <span class="ident">validate_and_normalise_user_input</span></span>(<span>app_info: AppInfo, contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", override: Union[<a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> <a title="supertokens_python.recipe.passwordless.utils.PasswordlessConfig" href="#supertokens_python.recipe.passwordless.utils.PasswordlessConfig">PasswordlessConfig</a></span>
314+
<span>def <span class="ident">validate_and_normalise_user_input</span></span>(<span>app_info: AppInfo, contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", override: Union[<a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, None] = None, get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None, email_delivery: Union[EmailDeliveryConfig[PasswordlessLoginEmailTemplateVars], None] = None, sms_delivery: Union[SMSDeliveryConfig[PasswordlessLoginSMSTemplateVars], None] = None) ‑> <a title="supertokens_python.recipe.passwordless.utils.PasswordlessConfig" href="#supertokens_python.recipe.passwordless.utils.PasswordlessConfig">PasswordlessConfig</a></span>
315315
</code></dt>
316316
<dd>
317317
<div class="desc"></div>
@@ -402,7 +402,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
402402
<dl>
403403
<dt id="supertokens_python.recipe.passwordless.utils.ContactConfig"><code class="flex name class">
404404
<span>class <span class="ident">ContactConfig</span></span>
405-
<span>(</span><span>contact_method: "Literal['PHONE', 'EMAIL', 'EMAIL_OR_PHONE']")</span>
405+
<span>(</span><span>contact_method: "Literal[('PHONE', 'EMAIL', 'EMAIL_OR_PHONE')]")</span>
406406
</code></dt>
407407
<dd>
408408
<div class="desc"><p>Helper class that provides a standard way to create an ABC using
@@ -549,7 +549,7 @@ <h3>Ancestors</h3>
549549
</dd>
550550
<dt id="supertokens_python.recipe.passwordless.utils.PasswordlessConfig"><code class="flex name class">
551551
<span>class <span class="ident">PasswordlessConfig</span></span>
552-
<span>(</span><span>contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, override: <a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, flow_type: "Literal['USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK']", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None)</span>
552+
<span>(</span><span>contact_config: <a title="supertokens_python.recipe.passwordless.utils.ContactConfig" href="#supertokens_python.recipe.passwordless.utils.ContactConfig">ContactConfig</a>, override: <a title="supertokens_python.recipe.passwordless.utils.OverrideConfig" href="#supertokens_python.recipe.passwordless.utils.OverrideConfig">OverrideConfig</a>, flow_type: "Literal[('USER_INPUT_CODE', 'MAGIC_LINK', 'USER_INPUT_CODE_AND_MAGIC_LINK')]", get_email_delivery_config: Callable[[], EmailDeliveryConfigWithService[PasswordlessLoginEmailTemplateVars]], get_sms_delivery_config: Callable[[], SMSDeliveryConfigWithService[PasswordlessLoginSMSTemplateVars]], get_custom_user_input_code: Union[Callable[[str, Dict[str, Any]], Awaitable[str]], None] = None)</span>
553553
</code></dt>
554554
<dd>
555555
<div class="desc"></div>

html/supertokens_python/recipe/session/access_token.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
4747
from jwt.exceptions import DecodeError
4848

4949
from supertokens_python.logger import log_debug_message
50+
from supertokens_python.recipe.session.utils import SessionConfig
5051
from supertokens_python.utils import get_timestamp_ms
5152

5253
from .exceptions import raise_try_refresh_token_exception
@@ -76,6 +77,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
7677

7778

7879
def get_info_from_access_token(
80+
config: SessionConfig,
7981
jwt_info: ParsedJWTInfo,
8082
do_anti_csrf_check: bool,
8183
):
@@ -88,7 +90,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
8890
)
8991

9092
if jwt_info.version &gt;= 3:
91-
matching_keys = get_latest_keys(jwt_info.kid)
93+
matching_keys = get_latest_keys(config, jwt_info.kid)
9294
payload = jwt.decode( # type: ignore
9395
jwt_info.raw_token_string,
9496
matching_keys[0].key, # type: ignore
@@ -98,7 +100,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
98100
else:
99101
# It won&#39;t have kid. So we&#39;ll have to try the token against all the keys from all the jwk_clients
100102
# If any of them work, we&#39;ll use that payload
101-
for k in get_latest_keys():
103+
for k in get_latest_keys(config):
102104
try:
103105
payload = jwt.decode( # type: ignore
104106
jwt_info.raw_token_string,
@@ -211,7 +213,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
211213
<h2 class="section-title" id="header-functions">Functions</h2>
212214
<dl>
213215
<dt id="supertokens_python.recipe.session.access_token.get_info_from_access_token"><code class="name flex">
214-
<span>def <span class="ident">get_info_from_access_token</span></span>(<span>jwt_info: ParsedJWTInfo, do_anti_csrf_check: bool)</span>
216+
<span>def <span class="ident">get_info_from_access_token</span></span>(<span>config: SessionConfig, jwt_info: ParsedJWTInfo, do_anti_csrf_check: bool)</span>
215217
</code></dt>
216218
<dd>
217219
<div class="desc"></div>
@@ -220,6 +222,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
220222
<span>Expand source code</span>
221223
</summary>
222224
<pre><code class="python">def get_info_from_access_token(
225+
config: SessionConfig,
223226
jwt_info: ParsedJWTInfo,
224227
do_anti_csrf_check: bool,
225228
):
@@ -232,7 +235,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
232235
)
233236

234237
if jwt_info.version &gt;= 3:
235-
matching_keys = get_latest_keys(jwt_info.kid)
238+
matching_keys = get_latest_keys(config, jwt_info.kid)
236239
payload = jwt.decode( # type: ignore
237240
jwt_info.raw_token_string,
238241
matching_keys[0].key, # type: ignore
@@ -242,7 +245,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
242245
else:
243246
# It won&#39;t have kid. So we&#39;ll have to try the token against all the keys from all the jwk_clients
244247
# If any of them work, we&#39;ll use that payload
245-
for k in get_latest_keys():
248+
for k in get_latest_keys(config):
246249
try:
247250
payload = jwt.decode( # type: ignore
248251
jwt_info.raw_token_string,
@@ -309,7 +312,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
309312
</details>
310313
</dd>
311314
<dt id="supertokens_python.recipe.session.access_token.sanitize_number"><code class="name flex">
312-
<span>def <span class="ident">sanitize_number</span></span>(<span>n: Any) ‑> Union[int, float, ForwardRef(None)]</span>
315+
<span>def <span class="ident">sanitize_number</span></span>(<span>n: Any) ‑> Union[int, float, None]</span>
313316
</code></dt>
314317
<dd>
315318
<div class="desc"></div>

html/supertokens_python/recipe/session/claim_base_classes/boolean_claim.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
8181
<dl>
8282
<dt id="supertokens_python.recipe.session.claim_base_classes.boolean_claim.BooleanClaim"><code class="flex name class">
8383
<span>class <span class="ident">BooleanClaim</span></span>
84-
<span>(</span><span>key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[bool]], bool, ForwardRef(None)]], default_max_age_in_sec: Optional[int] = None)</span>
84+
<span>(</span><span>key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[bool]], bool, None]], default_max_age_in_sec: Optional[int] = None)</span>
8585
</code></dt>
8686
<dd>
8787
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/recipe/session/claim_base_classes/primitive_array_claim.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ <h3>Methods</h3>
593593
</dd>
594594
<dt id="supertokens_python.recipe.session.claim_base_classes.primitive_array_claim.PrimitiveArrayClaim"><code class="flex name class">
595595
<span>class <span class="ident">PrimitiveArrayClaim</span></span>
596-
<span>(</span><span>key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~PrimitiveList]], ~PrimitiveList, ForwardRef(None)]], default_max_age_in_sec: Optional[int] = None)</span>
596+
<span>(</span><span>key: str, fetch_value: Callable[[str, str, Dict[str, Any]], Union[Awaitable[Optional[~PrimitiveList]], ~PrimitiveList, None]], default_max_age_in_sec: Optional[int] = None)</span>
597597
</code></dt>
598598
<dd>
599599
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

0 commit comments

Comments
 (0)