解决登录和oss问题
This commit is contained in:
1 parent
30c2e44dc0
commit
cd007e2f6a
15 files changed
+154
-12
No files matched your search
@@ -0,0 +1,14 @@
|
||||
from redis.cluster import key_slot
|
||||
|
||||
from app.redis_session import RedisAdminSessionStore, hash_refresh_token
|
||||
|
||||
|
||||
def test_redis_session_rotation_keys_share_cluster_slot():
|
||||
store = RedisAdminSessionStore.__new__(RedisAdminSessionStore)
|
||||
keys = [
|
||||
store._session_key("session-1"),
|
||||
store._refresh_key(hash_refresh_token("refresh-1")),
|
||||
store._refresh_key(hash_refresh_token("refresh-2")),
|
||||
]
|
||||
|
||||
assert len({key_slot(key.encode("utf-8")) for key in keys}) == 1
|
||||
Reference in new issue
Block a user