GET /admin/oauth/devices

分页列出当前租户下所有设备授权码会话,支持按状态和客户端ID过滤。仅管理员可访问。

OAuth `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
page query integer 否 1 页码
page_size query integer 否 20 每页数量
status query string 否 状态过滤(pending/authorized/denied/expired)
client_id query string 否 客户端ID过滤

响应

状态描述Schema
200设备授权列表dto.ListResponse-service-oauth/internal/handler/dto/DeviceAuthorizationListItem
400请求参数错误service-core/base/dto.SimpleResponse
401未认证:请提供有效的 Bearer Tokenservice-core/base/dto.SimpleResponse
403权限不足:需要管理员权限service-core/base/dto.SimpleResponse
500服务内部错误service-core/base/dto.SimpleResponse

引用的 Schema

dto.ListResponse-service-oauth/internal/handler/dto/DeviceAuthorizationListItem

字段类型必填示例约束描述
code integer 否
items array of

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

否 统一使用 items
message string 否
pagination object 否 分页信息(嵌套对象)
timestamp string 否
total integer 否 总条数(平铺,便于直接读取)

service-core/base/dto.PageInfo

字段类型必填示例约束描述
has_next boolean 否 HasNext indicates whether there is a next page
has_prev boolean 否 HasPrev indicates whether there is a previous page
page integer 否 Page is the current page number (1-based)
page_size integer 否 PageSize is the number of items per page
total integer 否 Total is the total number of items across all pages
total_pages integer 否 TotalPages is the total number of pages

service-core/base/dto.SimpleResponse

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

service-oauth/internal/handler/dto.DeviceAuthorizationListItem

字段类型必填示例约束描述
client_id string 否 app-123
created_at string 否 2026-01-15T10:20:00Z
device_code string 否 7Q4mXp2vKd9Wn3sT8rY5uB1cF0jL6aH
expires_at string 否 2026-01-15T10:30:00Z
interval integer 否 5
poll_count integer 否 3
scope string 否 openid profile
status string 否 pending
updated_at string 否 2026-01-15T10:22:00Z
user_code string 否 BDJW-DSXQ
user_id string 否 user-abc