taolib.testing.oauth.cache.keys#

OAuth Redis 缓存键定义模块。

定义 OAuth 系统中使用的所有 Redis 缓存键。

Functions#

oauth_state_key(→ str)

生成 CSRF state 缓存键。

oauth_session_key(→ str)

生成会话缓存键。

oauth_user_sessions_key(→ str)

生成用户会话列表缓存键。

Module Contents#

taolib.testing.oauth.cache.keys.oauth_state_key(state: str) str#

生成 CSRF state 缓存键。

参数:

state -- state token

返回:

Redis key

taolib.testing.oauth.cache.keys.oauth_session_key(session_id: str) str#

生成会话缓存键。

参数:

session_id -- 会话 ID

返回:

Redis key

taolib.testing.oauth.cache.keys.oauth_user_sessions_key(user_id: str) str#

生成用户会话列表缓存键。

参数:

user_id -- 用户 ID

返回:

Redis key