refactor(auth): merge cap domain plugin into auth

This commit is contained in:
ryan
2026-09-03 08:58:34 +08:00
parent 6b28adfacf
commit 30ab8810cc
23 changed files with 393 additions and 544 deletions
+29 -29
View File
@@ -4397,7 +4397,7 @@ const docTemplate = `{
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/cap.challengeRequest"
"$ref": "#/definitions/auth.challengeRequest"
}
}
],
@@ -4413,7 +4413,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.ChallengeResponse"
"$ref": "#/definitions/auth.ChallengeResponse"
}
}
}
@@ -4446,7 +4446,7 @@ const docTemplate = `{
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/cap.challengeRequest"
"$ref": "#/definitions/auth.challengeRequest"
}
}
],
@@ -4462,7 +4462,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.ChallengeResponse"
"$ref": "#/definitions/auth.ChallengeResponse"
}
}
}
@@ -4498,7 +4498,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cap.redeemRequest"
"$ref": "#/definitions/auth.redeemRequest"
}
}
],
@@ -4514,7 +4514,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.RedeemResponse"
"$ref": "#/definitions/auth.RedeemResponse"
}
}
}
@@ -6134,26 +6134,7 @@ const docTemplate = `{
}
}
},
"auth.OAuthAuthorizeResponse": {
"type": "object",
"properties": {
"authorize_url": {
"type": "string"
}
}
},
"auth.OAuthCallbackResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"user": {
"$ref": "#/definitions/auth.BasicUserInfo"
}
}
},
"cap.ChallengeResponse": {
"auth.ChallengeResponse": {
"type": "object",
"properties": {
"challenge": {
@@ -6179,7 +6160,26 @@ const docTemplate = `{
}
}
},
"cap.RedeemResponse": {
"auth.OAuthAuthorizeResponse": {
"type": "object",
"properties": {
"authorize_url": {
"type": "string"
}
}
},
"auth.OAuthCallbackResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"user": {
"$ref": "#/definitions/auth.BasicUserInfo"
}
}
},
"auth.RedeemResponse": {
"type": "object",
"properties": {
"error": {
@@ -6196,7 +6196,7 @@ const docTemplate = `{
}
}
},
"cap.challengeRequest": {
"auth.challengeRequest": {
"type": "object",
"properties": {
"scope": {
@@ -6204,7 +6204,7 @@ const docTemplate = `{
}
}
},
"cap.redeemRequest": {
"auth.redeemRequest": {
"type": "object",
"required": [
"solutions",
+29 -29
View File
@@ -4390,7 +4390,7 @@
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/cap.challengeRequest"
"$ref": "#/definitions/auth.challengeRequest"
}
}
],
@@ -4406,7 +4406,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.ChallengeResponse"
"$ref": "#/definitions/auth.ChallengeResponse"
}
}
}
@@ -4439,7 +4439,7 @@
"name": "request",
"in": "body",
"schema": {
"$ref": "#/definitions/cap.challengeRequest"
"$ref": "#/definitions/auth.challengeRequest"
}
}
],
@@ -4455,7 +4455,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.ChallengeResponse"
"$ref": "#/definitions/auth.ChallengeResponse"
}
}
}
@@ -4491,7 +4491,7 @@
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/cap.redeemRequest"
"$ref": "#/definitions/auth.redeemRequest"
}
}
],
@@ -4507,7 +4507,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/cap.RedeemResponse"
"$ref": "#/definitions/auth.RedeemResponse"
}
}
}
@@ -6127,26 +6127,7 @@
}
}
},
"auth.OAuthAuthorizeResponse": {
"type": "object",
"properties": {
"authorize_url": {
"type": "string"
}
}
},
"auth.OAuthCallbackResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"user": {
"$ref": "#/definitions/auth.BasicUserInfo"
}
}
},
"cap.ChallengeResponse": {
"auth.ChallengeResponse": {
"type": "object",
"properties": {
"challenge": {
@@ -6172,7 +6153,26 @@
}
}
},
"cap.RedeemResponse": {
"auth.OAuthAuthorizeResponse": {
"type": "object",
"properties": {
"authorize_url": {
"type": "string"
}
}
},
"auth.OAuthCallbackResult": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"user": {
"$ref": "#/definitions/auth.BasicUserInfo"
}
}
},
"auth.RedeemResponse": {
"type": "object",
"properties": {
"error": {
@@ -6189,7 +6189,7 @@
}
}
},
"cap.challengeRequest": {
"auth.challengeRequest": {
"type": "object",
"properties": {
"scope": {
@@ -6197,7 +6197,7 @@
}
}
},
"cap.redeemRequest": {
"auth.redeemRequest": {
"type": "object",
"required": [
"solutions",
+22 -22
View File
@@ -55,19 +55,7 @@ definitions:
- code
- state
type: object
auth.OAuthAuthorizeResponse:
properties:
authorize_url:
type: string
type: object
auth.OAuthCallbackResult:
properties:
status:
type: string
user:
$ref: '#/definitions/auth.BasicUserInfo'
type: object
cap.ChallengeResponse:
auth.ChallengeResponse:
properties:
challenge:
properties:
@@ -84,7 +72,19 @@ definitions:
token:
type: string
type: object
cap.RedeemResponse:
auth.OAuthAuthorizeResponse:
properties:
authorize_url:
type: string
type: object
auth.OAuthCallbackResult:
properties:
status:
type: string
user:
$ref: '#/definitions/auth.BasicUserInfo'
type: object
auth.RedeemResponse:
properties:
error:
type: string
@@ -95,12 +95,12 @@ definitions:
token:
type: string
type: object
cap.challengeRequest:
auth.challengeRequest:
properties:
scope:
type: string
type: object
cap.redeemRequest:
auth.redeemRequest:
properties:
scope:
type: string
@@ -4031,7 +4031,7 @@ paths:
in: body
name: request
schema:
$ref: '#/definitions/cap.challengeRequest'
$ref: '#/definitions/auth.challengeRequest'
produces:
- application/json
responses:
@@ -4042,7 +4042,7 @@ paths:
- $ref: '#/definitions/response.Any'
- properties:
data:
$ref: '#/definitions/cap.ChallengeResponse'
$ref: '#/definitions/auth.ChallengeResponse'
type: object
"500":
description: 内部服务错误
@@ -4060,7 +4060,7 @@ paths:
in: body
name: request
schema:
$ref: '#/definitions/cap.challengeRequest'
$ref: '#/definitions/auth.challengeRequest'
produces:
- application/json
responses:
@@ -4071,7 +4071,7 @@ paths:
- $ref: '#/definitions/response.Any'
- properties:
data:
$ref: '#/definitions/cap.ChallengeResponse'
$ref: '#/definitions/auth.ChallengeResponse'
type: object
"500":
description: 内部服务错误
@@ -4091,7 +4091,7 @@ paths:
name: request
required: true
schema:
$ref: '#/definitions/cap.redeemRequest'
$ref: '#/definitions/auth.redeemRequest'
produces:
- application/json
responses:
@@ -4102,7 +4102,7 @@ paths:
- $ref: '#/definitions/response.Any'
- properties:
data:
$ref: '#/definitions/cap.RedeemResponse'
$ref: '#/definitions/auth.RedeemResponse'
type: object
"400":
description: 参数错误或核销失败