POST /oauth/bind/initiate

需 JWT 认证。服务端生成 PKCE 与签名 state,返回 provider 授权 URL;回调在 oauth-service 完成并跳回 return_to。

OAuth `bearerAuth` application/json

请求体

Schema: service-oauth/internal/handler/dto.BindInitiateRequest

字段类型必填示例约束描述
provider string 是 github
return_to string 是 https://user.autional.cn/platform/security

响应

状态描述Schema
200授权 URLdto.DataResponse-service-oauth/internal/handler/dto/BindInitiateResponse
400参数错误或 return_to 不在白名单service-core/base/dto.SimpleResponse
401未认证service-core/base/dto.SimpleResponse
503流程存储或 provider 未配置service-core/base/dto.SimpleResponse

引用的 Schema

dto.DataResponse-service-oauth/internal/handler/dto/BindInitiateResponse

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

service-core/base/dto.SimpleResponse

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

service-oauth/internal/handler/dto.BindInitiateResponse

字段类型必填示例约束描述
auth_url string 否 https://github.com/login/oauth/authorize?... 授权跳转URL
state string 否 random-state.hmac 签名后的 state