POST /internal/oauth/export-user-data

内部API端点,由 identity-service 用户数据导出聚合调用。返回用户 OAuth 连接与授权同意记录。 受 InternalAPIKeyAuth + ExtractTenantFromHeaderStrict 中间件保护。

OAuth - 内部接口 None application/json

请求体

接受空 JSON 对象 {}

响应

状态描述Schema
200用户 OAuth 数据导出结果handler.swaggerExportUserDataDetailResponse
400请求参数错误:缺少 user_idservice-core/base/dto.SimpleResponse
500服务内部错误service-core/base/dto.SimpleResponse

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-oauth/internal/handler/dto.ConsentResponse

字段类型必填示例约束描述
alias string 否 小说 Alias 显示简称(metadata.alias):优先于 ClientName 展示,空则由前端回退。
client_id string 否 app-123
client_name string 否 My App
granted_at string 否 2026-04-15T10:30:00Z
id string 否 01ARZ3NDEKTSV4RRFFQ69G5FAV
logo_uri string 否 https://app.example.com/logo.png
scopes string 否 openid profile email
website string 否 https://app.example.com

service-oauth/internal/handler/dto.OAuthConnectionItem

字段类型必填示例约束描述
created_at string 否 2026-04-15T10:30:00Z
id string 否 conn_abc123
profile_data object 否
provider_id string 否 github
provider_user_id string 否 12345678
tenant_id string 否 tenant_abc123
token_expiry string 否 2026-04-15T10:30:00Z
updated_at string 否 2026-04-15T10:30:00Z
user_id string 否 usr_abc123

service-oauth/internal/handler/dto.UserOAuthExportResponse

字段类型必填示例约束描述
connections array of

参见 service-oauth/internal/handler/dto.OAuthConnectionItem

否
consents array of

参见 service-oauth/internal/handler/dto.ConsentResponse

否

handler.swaggerExportUserDataDetailResponse

字段类型必填示例约束描述
code integer 否
data service-oauth/internal/handler/dto.UserOAuthExportResponse 否
message string 否