Add Hose Auth and SSO module with token auto-extraction postprocessors
This commit is contained in:
1 parent
ea95723f37
commit
be9809cf23
2 files changed
+286
-7
No files matched your search
@@ -65,6 +65,7 @@ const spec = {
|
||||
}
|
||||
],
|
||||
tags: [
|
||||
{ name: "Hose Auth & SSO", description: "合思开放平台鉴权与免登中转换票 (前置 Token 链路)" },
|
||||
{ name: "Auth & Session", description: "身份验证、当前会话与 SSO 换票" },
|
||||
{ name: "Approval Rules", description: "审批规则草稿、版本快照与发布" },
|
||||
{ name: "Knowledge Documents", description: "知识库规章与文档管理" },
|
||||
@@ -77,6 +78,118 @@ const spec = {
|
||||
{ name: "System, LLM & Billing", description: "大模型设置、系统权限与计费套餐" }
|
||||
],
|
||||
paths: {
|
||||
"/api/openapi/v1/auth/getAccessToken": {
|
||||
post: {
|
||||
tags: ["Hose Auth & SSO"],
|
||||
"x-apifox-folder": "原始业务接口/Hose Auth & SSO",
|
||||
summary: "合思 OpenAPI 获取企业访问令牌 (Step 1 -> hoseOpenApiToken)",
|
||||
description: "调用合思开放平台凭证换取企业级 accessToken,用于后续免登换票操作。",
|
||||
operationId: "getHoseOpenapiAccessToken",
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
required: ["appKey", "appSecurity"],
|
||||
properties: {
|
||||
appKey: { type: "string", default: "{{hoseApiKey}}", description: "合思 OpenAPI Key" },
|
||||
appSecurity: { type: "string", default: "{{hoseApiSecret}}", description: "合思 OpenAPI Secret (密钥)" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "合思企业 AccessToken 响应",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
value: {
|
||||
type: "object",
|
||||
properties: {
|
||||
accessToken: { type: "string", description: "企业访问令牌" },
|
||||
corporation: {
|
||||
type: "object",
|
||||
properties: {
|
||||
id: { type: "string" },
|
||||
name: { type: "string" }
|
||||
}
|
||||
},
|
||||
staff: {
|
||||
type: "object",
|
||||
properties: {
|
||||
id: { type: "string" },
|
||||
name: { type: "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/openapi/v1.1/provisional/getProvisionalAuth": {
|
||||
post: {
|
||||
tags: ["Hose Auth & SSO"],
|
||||
"x-apifox-folder": "原始业务接口/Hose Auth & SSO",
|
||||
summary: "合思 CloseAPI 获取免登换票令牌 (Step 2 -> hoseProvisionalToken)",
|
||||
description: "使用合思企业 AccessToken 与操作人员工 ID,生成免登 Ticket URL,提取 accessToken 用于 Seal SSO 换票。",
|
||||
operationId: "getHoseProvisionalAuth",
|
||||
parameters: [
|
||||
{
|
||||
name: "accessToken",
|
||||
in: "query",
|
||||
required: true,
|
||||
schema: { type: "string", default: "{{hoseOpenApiToken}}" },
|
||||
description: "合思企业级 accessToken"
|
||||
}
|
||||
],
|
||||
requestBody: {
|
||||
required: true,
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
required: ["uid"],
|
||||
properties: {
|
||||
uid: { type: "string", default: "{{hoseUserId}}", description: "合思员工 ID / StaffId (例如: ID01Jdq2yIDnMr:ID01KsDgHaH5nN)" },
|
||||
pageType: { type: "string", default: "home", description: "免登落地页类型" },
|
||||
expireDate: { type: "integer", default: 7200, description: "临时免登凭据有效期(秒)" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
responses: {
|
||||
"200": {
|
||||
description: "免登中转 URL 响应",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
value: {
|
||||
type: "object",
|
||||
properties: {
|
||||
message: { type: "string", description: "带 accessToken 临时中转票据的完整免登 URL" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/auth/me": {
|
||||
get: {
|
||||
tags: ["Auth & Session"],
|
||||
@@ -149,16 +262,17 @@ const spec = {
|
||||
},
|
||||
"/api/auth/oauth2/session/oem-hosecloud": {
|
||||
get: {
|
||||
tags: ["Auth & Session"],
|
||||
"x-apifox-folder": "原始业务接口/Auth & Session",
|
||||
summary: "合思 OEM SSO 换取 Seal 会话 Token",
|
||||
tags: ["Hose Auth & SSO", "Auth & Session"],
|
||||
"x-apifox-folder": "原始业务接口/Hose Auth & SSO",
|
||||
summary: "合思 OEM SSO 换取 Seal 会话 Token (Step 3 -> sealToken)",
|
||||
description: "使用合思第二层免登 Token(hoseProvisionalToken)向 Seal AI 服务换取会话 Token,并自动保存到环境变量 sealToken 中。",
|
||||
operationId: "oauthHosecloudSession",
|
||||
parameters: [
|
||||
{
|
||||
name: "token",
|
||||
in: "query",
|
||||
required: true,
|
||||
schema: { type: "string" },
|
||||
schema: { type: "string", default: "{{hoseProvisionalToken}}" },
|
||||
description: "合思 closeapi 换票 token"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user