feat: refactor out form package and optimize verification code module (#1787)

* refactor: add forms package and optimize verification code module

* chore: add license

* chore: fix lint

* chore: fix lint

* chore: fix lint

* chore: swagger
This commit is contained in:
Yaodong Yu
2023-04-25 23:05:53 +08:00
committed by GitHub
parent 511aefb706
commit 95f4f4cb6d
36 changed files with 538 additions and 596 deletions

View File

@ -551,15 +551,33 @@
"operationId": "ApiController.GetCaptcha"
}
},
"/api/api/get-webhook-event": {
"/api/api/get-captcha-status": {
"get": {
"tags": [
"GetCaptchaStatus API"
"Token API"
],
"operationId": "ApiController.GetCaptchaStatus"
"description": "Get Login Error Counts",
"operationId": "ApiController.GetCaptchaStatus",
"parameters": [
{
"in": "query",
"name": "id",
"description": "The id ( owner/name ) of user",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "The Response object",
"schema": {
"$ref": "#/definitions/controllers.Response"
}
}
}
}
},
"/api/api/get-captcha-status": {
"/api/api/get-webhook-event": {
"get": {
"tags": [
"GetWebhookEventType API"
@ -662,7 +680,7 @@
"/api/api/verify-code": {
"post": {
"tags": [
"Account API"
"Verification API"
],
"operationId": "ApiController.VerifyCode"
}
@ -2752,7 +2770,7 @@
"description": "Login information",
"required": true,
"schema": {
"$ref": "#/definitions/controllers.RequestForm"
"$ref": "#/definitions/controllers.AuthForm"
}
}
],
@ -3891,11 +3909,11 @@
}
},
"definitions": {
"2306.0xc0004a1410.false": {
"1183.0xc000455050.false": {
"title": "false",
"type": "object"
},
"2340.0xc0004a1440.false": {
"1217.0xc000455080.false": {
"title": "false",
"type": "object"
},
@ -3907,6 +3925,10 @@
"title": "Response",
"type": "object"
},
"controllers.AuthForm": {
"title": "AuthForm",
"type": "object"
},
"controllers.EmailForm": {
"title": "EmailForm",
"type": "object",
@ -3931,108 +3953,15 @@
}
}
},
"controllers.RequestForm": {
"title": "RequestForm",
"type": "object",
"properties": {
"affiliation": {
"type": "string"
},
"application": {
"type": "string"
},
"autoSignin": {
"type": "boolean"
},
"captchaToken": {
"type": "string"
},
"captchaType": {
"type": "string"
},
"clientId": {
"type": "string"
},
"clientSecret": {
"type": "string"
},
"code": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"email": {
"type": "string"
},
"emailCode": {
"type": "string"
},
"firstName": {
"type": "string"
},
"idCard": {
"type": "string"
},
"lastName": {
"type": "string"
},
"method": {
"type": "string"
},
"name": {
"type": "string"
},
"organization": {
"type": "string"
},
"password": {
"type": "string"
},
"phone": {
"type": "string"
},
"phoneCode": {
"type": "string"
},
"provider": {
"type": "string"
},
"redirectUri": {
"type": "string"
},
"region": {
"type": "string"
},
"relayState": {
"type": "string"
},
"samlRequest": {
"type": "string"
},
"samlResponse": {
"type": "string"
},
"state": {
"type": "string"
},
"type": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"controllers.Response": {
"title": "Response",
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/2306.0xc0004a1410.false"
"$ref": "#/definitions/1183.0xc000455050.false"
},
"data2": {
"$ref": "#/definitions/2340.0xc0004a1440.false"
"$ref": "#/definitions/1217.0xc000455080.false"
},
"msg": {
"type": "string"