taolib.testing.oauth.models.connection#
OAuth 连接数据模型模块。
定义 OAuth 连接(用户与第三方提供商的关联)相关的 Pydantic 模型。
Classes#
OAuth 连接基础模型。 |
|
创建 OAuth 连接请求模型。 |
|
更新 OAuth 连接请求模型。 |
|
OAuth 连接响应模型。 |
|
MongoDB OAuth 连接文档模型。 |
Module Contents#
- class taolib.testing.oauth.models.connection.OAuthConnectionBase#
Bases:
pydantic.BaseModelOAuth 连接基础模型。
- class taolib.testing.oauth.models.connection.OAuthConnectionCreate#
Bases:
OAuthConnectionBase创建 OAuth 连接请求模型。
- token_expires_at: datetime.datetime | None#
- class taolib.testing.oauth.models.connection.OAuthConnectionUpdate#
Bases:
pydantic.BaseModel更新 OAuth 连接请求模型。
- token_expires_at: datetime.datetime | None#
- last_used_at: datetime.datetime | None#
- class taolib.testing.oauth.models.connection.OAuthConnectionResponse#
Bases:
OAuthConnectionBaseOAuth 连接响应模型。
不包含加密的 Token 信息。
- token_expires_at: datetime.datetime | None#
- last_used_at: datetime.datetime | None#
- created_at: datetime.datetime#
- updated_at: datetime.datetime#
- class taolib.testing.oauth.models.connection.OAuthConnectionDocument#
Bases:
OAuthConnectionBaseMongoDB OAuth 连接文档模型。
- token_expires_at: datetime.datetime | None#
- last_used_at: datetime.datetime | None#
- created_at: datetime.datetime#
- updated_at: datetime.datetime#
- to_response() OAuthConnectionResponse#
转换为响应模型(不包含加密 Token)。