GET /oauth/{provider}/authorize

根据提供商名称生成第三方 OAuth 授权跳转 URL。state 参数可选,不传则自动生成并签名。

OAuth None application/json

请求参数

名称位置类型必填默认值示例约束描述
provider path string 是 提供商名称
state query string 否 OAuth state 参数

响应

引用的 Schema

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

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

service-core/base/dto.SimpleResponse

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

service-oauth/internal/handler/dto.AuthorizeURLResponse

OAuth授权URL响应

字段类型必填示例约束描述
auth_url string 否 https://provider.com/authorize?client_id=... 授权URL
state string 否 random-state-string 状态