@@ -47,6 +47,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.session.access_token</c
4747from jwt.exceptions import DecodeError
4848
4949from supertokens_python.logger import log_debug_message
50+ from supertokens_python.recipe.session.utils import SessionConfig
5051from supertokens_python.utils import get_timestamp_ms
5152
5253from .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
7879def 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 >= 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't have kid. So we'll have to try the token against all the keys from all the jwk_clients
100102 # If any of them work, we'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 >= 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't have kid. So we'll have to try the token against all the keys from all the jwk_clients
244247 # If any of them work, we'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 >
0 commit comments