Skip to content

Commit 31d6896

Browse files
committed
refactor: Remove unused refresh rate limit
1 parent 20853cc commit 31d6896

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

supertokens_python/recipe/session/jwks.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828

2929
class JWKSConfigType(TypedDict):
3030
cache_max_age: int
31-
refresh_rate_limit: int
3231
request_timeout: int
3332

3433

3534
JWKSConfig: JWKSConfigType = {
3635
"cache_max_age": JWKCacheMaxAgeInMs,
37-
"refresh_rate_limit": JWKRequestCooldownInMs, # FIXME: Not used
3836
"request_timeout": 5000, # 5s
3937
}
4038

tests/sessions/test_jwks.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ async def test_that_jwks_is_fetched_as_expected(caplog: LogCaptureFixture):
6868
caplog.set_level(logging.DEBUG)
6969

7070
original_jwks_config = JWKSConfig.copy()
71-
JWKSConfig["refresh_rate_limit"] = 100
7271
JWKSConfig["cache_max_age"] = 2000
7372

7473
well_known_count = get_log_occurence_count(caplog)
@@ -105,7 +104,6 @@ async def test_that_jwks_result_is_refreshed_properly(caplog: LogCaptureFixture)
105104
jwks_refresh_count = get_log_occurence_count(caplog)
106105

107106
original_jwks_config = JWKSConfig.copy()
108-
JWKSConfig["refresh_rate_limit"] = 100
109107
JWKSConfig["cache_max_age"] = 2000
110108

111109
init(**get_st_init_args(recipe_list=[session.init()]))
@@ -224,7 +222,6 @@ async def test_jwks_cache_logic(caplog: LogCaptureFixture):
224222
"""
225223
caplog.set_level(logging.DEBUG)
226224
original_jwks_config = JWKSConfig.copy()
227-
JWKSConfig["refresh_rate_limit"] = 100
228225
JWKSConfig["cache_max_age"] = 2000
229226

230227
jwks_refresh_count = get_log_occurence_count(caplog)
@@ -355,7 +352,6 @@ async def test_that_jwks_returns_from_cache_correctly(caplog: LogCaptureFixture)
355352
)
356353

357354
original_jwks_config = JWKSConfig.copy()
358-
JWKSConfig["refresh_rate_limit"] = 100
359355
JWKSConfig["cache_max_age"] = 2000
360356

361357
init(**get_st_init_args(recipe_list=[session.init()]))
@@ -538,7 +534,6 @@ async def test_that_locking_for_jwks_cache_works(caplog: LogCaptureFixture):
538534
)
539535

540536
original_jwks_config = JWKSConfig.copy()
541-
JWKSConfig["refresh_rate_limit"] = 100
542537
JWKSConfig["cache_max_age"] = 2000
543538

544539
set_key_value_in_config(

0 commit comments

Comments
 (0)