diff --git a/controllers/account.go b/controllers/account.go index 225dbc41..b010a220 100644 --- a/controllers/account.go +++ b/controllers/account.go @@ -453,7 +453,7 @@ func (c *ApiController) GetUserinfo2() { // GetCaptcha ... // @Tag Login API // @Title GetCaptcha -// @router /api/get-captcha [get] +// @router /get-captcha [get] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) GetCaptcha() { applicationId := c.Input().Get("applicationId") diff --git a/controllers/auth.go b/controllers/auth.go index 80936956..efdfcea1 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -918,7 +918,7 @@ func (c *ApiController) HandleSamlLogin() { // HandleOfficialAccountEvent ... // @Tag HandleOfficialAccountEvent API // @Title HandleOfficialAccountEvent -// @router /api/webhook [POST] +// @router /webhook [POST] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) HandleOfficialAccountEvent() { respBytes, err := ioutil.ReadAll(c.Ctx.Request.Body) @@ -949,7 +949,7 @@ func (c *ApiController) HandleOfficialAccountEvent() { // GetWebhookEventType ... // @Tag GetWebhookEventType API // @Title GetWebhookEventType -// @router /api/get-webhook-event [GET] +// @router /get-webhook-event [GET] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) GetWebhookEventType() { lock.Lock() @@ -970,7 +970,7 @@ func (c *ApiController) GetWebhookEventType() { // @Description Get Login Error Counts // @Param id query string true "The id ( owner/name ) of user" // @Success 200 {object} controllers.Response The Response object -// @router /api/get-captcha-status [get] +// @router /get-captcha-status [get] func (c *ApiController) GetCaptchaStatus() { organization := c.Input().Get("organization") userId := c.Input().Get("userId") @@ -1001,7 +1001,7 @@ func (c *ApiController) GetCaptchaStatus() { // @Title Callback // @Tag Callback API // @Description Get Login Error Counts -// @router /api/Callback [post] +// @router /Callback [post] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) Callback() { code := c.GetString("code") diff --git a/controllers/service.go b/controllers/service.go index 1ad7d8f0..acb0a93c 100644 --- a/controllers/service.go +++ b/controllers/service.go @@ -52,7 +52,7 @@ type NotificationForm struct { // @Param clientSecret query string true "The clientSecret of the application" // @Param from body controllers.EmailForm true "Details of the email request" // @Success 200 {object} controllers.Response The Response object -// @router /api/send-email [post] +// @router /send-email [post] func (c *ApiController) SendEmail() { userId, ok := c.RequireSignedIn() if !ok { @@ -148,7 +148,7 @@ func (c *ApiController) SendEmail() { // @Param clientSecret query string true "The clientSecret of the application" // @Param from body controllers.SmsForm true "Details of the sms request" // @Success 200 {object} controllers.Response The Response object -// @router /api/send-sms [post] +// @router /send-sms [post] func (c *ApiController) SendSms() { provider, err := c.GetProviderFromContext("SMS") if err != nil { @@ -186,7 +186,7 @@ func (c *ApiController) SendSms() { // @Description This API is not for Casdoor frontend to call, it is for Casdoor SDKs. // @Param from body controllers.NotificationForm true "Details of the notification request" // @Success 200 {object} controllers.Response The Response object -// @router /api/send-notification [post] +// @router /send-notification [post] func (c *ApiController) SendNotification() { provider, err := c.GetProviderFromContext("Notification") if err != nil { diff --git a/controllers/token.go b/controllers/token.go index 87cb1951..97d6538e 100644 --- a/controllers/token.go +++ b/controllers/token.go @@ -156,7 +156,7 @@ func (c *ApiController) DeleteToken() { // @Success 200 {object} object.TokenWrapper The Response object // @Success 400 {object} object.TokenError The Response object // @Success 401 {object} object.TokenError The Response object -// @router api/login/oauth/access_token [post] +// @router /login/oauth/access_token [post] func (c *ApiController) GetOAuthToken() { clientId := c.Input().Get("client_id") clientSecret := c.Input().Get("client_secret") diff --git a/controllers/verification.go b/controllers/verification.go index bbef208a..40afa0b7 100644 --- a/controllers/verification.go +++ b/controllers/verification.go @@ -272,7 +272,7 @@ func (c *ApiController) VerifyCaptcha() { // ResetEmailOrPhone ... // @Tag Account API // @Title ResetEmailOrPhone -// @router /api/reset-email-or-phone [post] +// @router /reset-email-or-phone [post] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) ResetEmailOrPhone() { user, ok := c.RequireSignedInUser() @@ -367,7 +367,7 @@ func (c *ApiController) ResetEmailOrPhone() { // VerifyCode // @Tag Verification API // @Title VerifyCode -// @router /api/verify-code [post] +// @router /verify-code [post] // @Success 200 {object} object.Userinfo The Response object func (c *ApiController) VerifyCode() { var authForm form.AuthForm diff --git a/swagger/swagger.json b/swagger/swagger.json index f6441261..f9576885 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -47,6 +47,23 @@ } } }, + "/api/Callback": { + "post": { + "tags": [ + "Callback API" + ], + "description": "Get Login Error Counts", + "operationId": "ApiController.Callback", + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Userinfo" + } + } + } + } + }, "/api/add-adapter": { "post": { "tags": [ @@ -187,6 +204,34 @@ } } }, + "/api/add-invitation": { + "post": { + "tags": [ + "Invitation API" + ], + "description": "add invitation", + "operationId": "ApiController.AddInvitation", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The details of the invitation", + "required": true, + "schema": { + "$ref": "#/definitions/object.Invitation" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, "/api/add-ldap": { "post": { "tags": [ @@ -686,241 +731,6 @@ } } }, - "/api/api/Callback": { - "post": { - "tags": [ - "Callback API" - ], - "description": "Get Login Error Counts", - "operationId": "ApiController.Callback", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, - "/api/api/get-captcha": { - "get": { - "tags": [ - "Login API" - ], - "operationId": "ApiController.GetCaptcha", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, - "/api/api/get-captcha-status": { - "get": { - "tags": [ - "Token API" - ], - "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-webhook-event": { - "get": { - "tags": [ - "GetWebhookEventType API" - ], - "operationId": "ApiController.GetWebhookEventType", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, - "/api/api/reset-email-or-phone": { - "post": { - "tags": [ - "Account API" - ], - "operationId": "ApiController.ResetEmailOrPhone", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, - "/api/api/send-email": { - "post": { - "tags": [ - "Service API" - ], - "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", - "operationId": "ApiController.SendEmail", - "parameters": [ - { - "in": "query", - "name": "clientId", - "description": "The clientId of the application", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "clientSecret", - "description": "The clientSecret of the application", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "from", - "description": "Details of the email request", - "required": true, - "schema": { - "$ref": "#/definitions/controllers.EmailForm" - } - } - ], - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/controllers.Response" - } - } - } - } - }, - "/api/api/send-notification": { - "post": { - "tags": [ - "Service API" - ], - "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", - "operationId": "ApiController.SendNotification", - "parameters": [ - { - "in": "body", - "name": "from", - "description": "Details of the notification request", - "required": true, - "schema": { - "$ref": "#/definitions/controllers.NotificationForm" - } - } - ], - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/controllers.Response" - } - } - } - } - }, - "/api/api/send-sms": { - "post": { - "tags": [ - "Service API" - ], - "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", - "operationId": "ApiController.SendSms", - "parameters": [ - { - "in": "query", - "name": "clientId", - "description": "The clientId of the application", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "clientSecret", - "description": "The clientSecret of the application", - "required": true, - "type": "string" - }, - { - "in": "body", - "name": "from", - "description": "Details of the sms request", - "required": true, - "schema": { - "$ref": "#/definitions/controllers.SmsForm" - } - } - ], - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/controllers.Response" - } - } - } - } - }, - "/api/api/verify-code": { - "post": { - "tags": [ - "Verification API" - ], - "operationId": "ApiController.VerifyCode", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, - "/api/api/webhook": { - "post": { - "tags": [ - "HandleOfficialAccountEvent API" - ], - "operationId": "ApiController.HandleOfficialAccountEvent", - "responses": { - "200": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.Userinfo" - } - } - } - } - }, "/api/batch-enforce": { "post": { "tags": [ @@ -952,6 +762,12 @@ "name": "modelId", "description": "model id", "type": "string" + }, + { + "in": "query", + "name": "owner", + "description": "owner", + "type": "string" } ], "responses": { @@ -1153,6 +969,34 @@ } } }, + "/api/delete-invitation": { + "post": { + "tags": [ + "Invitation API" + ], + "description": "delete invitation", + "operationId": "ApiController.DeleteInvitation", + "parameters": [ + { + "in": "body", + "name": "body", + "description": "The details of the invitation", + "required": true, + "schema": { + "$ref": "#/definitions/object.Invitation" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, "/api/delete-ldap": { "post": { "tags": [ @@ -1683,6 +1527,12 @@ "name": "resourceId", "description": "resource id", "type": "string" + }, + { + "in": "query", + "name": "owner", + "description": "owner", + "type": "string" } ], "responses": { @@ -1876,6 +1726,48 @@ } } }, + "/api/get-captcha": { + "get": { + "tags": [ + "Login API" + ], + "operationId": "ApiController.GetCaptcha", + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Userinfo" + } + } + } + } + }, + "/api/get-captcha-status": { + "get": { + "tags": [ + "Token API" + ], + "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/get-cert": { "get": { "tags": [ @@ -2177,6 +2069,61 @@ } } }, + "/api/get-invitation": { + "get": { + "tags": [ + "Invitation API" + ], + "description": "get invitation", + "operationId": "ApiController.GetInvitation", + "parameters": [ + { + "in": "query", + "name": "id", + "description": "The id ( owner/name ) of the invitation", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Invitation" + } + } + } + } + }, + "/api/get-invitations": { + "get": { + "tags": [ + "Invitation API" + ], + "description": "get invitations", + "operationId": "ApiController.GetInvitations", + "parameters": [ + { + "in": "query", + "name": "owner", + "description": "The owner of invitations", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/object.Invitation" + } + } + } + } + } + }, "/api/get-ldap": { "get": { "tags": [ @@ -3486,6 +3433,22 @@ } } }, + "/api/get-webhook-event": { + "get": { + "tags": [ + "GetWebhookEventType API" + ], + "operationId": "ApiController.GetWebhookEventType", + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Userinfo" + } + } + } + } + }, "/api/get-webhooks": { "get": { "tags": [ @@ -3679,6 +3642,65 @@ } } }, + "/api/login/oauth/access_token": { + "post": { + "tags": [ + "Token API" + ], + "description": "get OAuth access token", + "operationId": "ApiController.GetOAuthToken", + "parameters": [ + { + "in": "query", + "name": "grant_type", + "description": "OAuth grant type", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "client_id", + "description": "OAuth client id", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "client_secret", + "description": "OAuth client secret", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "code", + "description": "OAuth code", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.TokenWrapper" + } + }, + "400": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.TokenError" + } + }, + "401": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.TokenError" + } + } + } + } + }, "/api/login/oauth/introspect": { "post": { "description": "The introspection endpoint is an OAuth 2.0 endpoint that takes a", @@ -3902,6 +3924,22 @@ } } }, + "/api/reset-email-or-phone": { + "post": { + "tags": [ + "Account API" + ], + "operationId": "ApiController.ResetEmailOrPhone", + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Userinfo" + } + } + } + } + }, "/api/run-syncer": { "get": { "tags": [ @@ -3930,6 +3968,118 @@ } } }, + "/api/send-email": { + "post": { + "tags": [ + "Service API" + ], + "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", + "operationId": "ApiController.SendEmail", + "parameters": [ + { + "in": "query", + "name": "clientId", + "description": "The clientId of the application", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "clientSecret", + "description": "The clientSecret of the application", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "from", + "description": "Details of the email request", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.EmailForm" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, + "/api/send-notification": { + "post": { + "tags": [ + "Service API" + ], + "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", + "operationId": "ApiController.SendNotification", + "parameters": [ + { + "in": "body", + "name": "from", + "description": "Details of the notification request", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.NotificationForm" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, + "/api/send-sms": { + "post": { + "tags": [ + "Service API" + ], + "description": "This API is not for Casdoor frontend to call, it is for Casdoor SDKs.", + "operationId": "ApiController.SendSms", + "parameters": [ + { + "in": "query", + "name": "clientId", + "description": "The clientId of the application", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "clientSecret", + "description": "The clientSecret of the application", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "from", + "description": "Details of the sms request", + "required": true, + "schema": { + "$ref": "#/definitions/controllers.SmsForm" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, "/api/send-verification-code": { "post": { "tags": [ @@ -4260,6 +4410,41 @@ } } }, + "/api/update-invitation": { + "post": { + "tags": [ + "Invitation API" + ], + "description": "update invitation", + "operationId": "ApiController.UpdateInvitation", + "parameters": [ + { + "in": "query", + "name": "id", + "description": "The id ( owner/name ) of the invitation", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "The details of the invitation", + "required": true, + "schema": { + "$ref": "#/definitions/object.Invitation" + } + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, "/api/update-ldap": { "post": { "tags": [ @@ -4970,6 +5155,48 @@ } } }, + "/api/verify-code": { + "post": { + "tags": [ + "Verification API" + ], + "operationId": "ApiController.VerifyCode", + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/object.Userinfo" + } + } + } + } + }, + "/api/verify-invitation": { + "get": { + "tags": [ + "Invitation API" + ], + "description": "verify invitation", + "operationId": "ApiController.VerifyInvitation", + "parameters": [ + { + "in": "query", + "name": "id", + "description": "The id ( owner/name ) of the invitation", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The Response object", + "schema": { + "$ref": "#/definitions/controllers.Response" + } + } + } + } + }, "/api/webauthn/signin/begin": { "get": { "tags": [ @@ -5076,60 +5303,17 @@ } } }, - "/apiapi/login/oauth/access_token": { + "/api/webhook": { "post": { "tags": [ - "Token API" - ], - "description": "get OAuth access token", - "operationId": "ApiController.GetOAuthToken", - "parameters": [ - { - "in": "query", - "name": "grant_type", - "description": "OAuth grant type", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "client_id", - "description": "OAuth client id", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "client_secret", - "description": "OAuth client secret", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "code", - "description": "OAuth code", - "required": true, - "type": "string" - } + "HandleOfficialAccountEvent API" ], + "operationId": "ApiController.HandleOfficialAccountEvent", "responses": { "200": { "description": "The Response object", "schema": { - "$ref": "#/definitions/object.TokenWrapper" - } - }, - "400": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.TokenError" - } - }, - "401": { - "description": "The Response object", - "schema": { - "$ref": "#/definitions/object.TokenError" + "$ref": "#/definitions/object.Userinfo" } } } @@ -5286,6 +5470,10 @@ } } }, + "jose.JSONWebKey": { + "title": "JSONWebKey", + "type": "object" + }, "model.Model": { "title": "Model", "type": "object" @@ -5414,11 +5602,11 @@ "type": "integer", "format": "int64" }, - "failedSigninLimit": { + "failedSigninFrozenTime": { "type": "integer", "format": "int64" }, - "failedSigninFrozenTime": { + "failedSigninLimit": { "type": "integer", "format": "int64" }, @@ -5502,6 +5690,12 @@ "signinHtml": { "type": "string" }, + "signinMethods": { + "type": "array", + "items": { + "$ref": "#/definitions/object.SigninMethod" + } + }, "signinUrl": { "type": "string" }, @@ -5529,6 +5723,12 @@ "themeData": { "$ref": "#/definitions/object.ThemeData" }, + "tokenFields": { + "type": "array", + "items": { + "type": "string" + } + }, "tokenFormat": { "type": "string" } @@ -5762,6 +5962,56 @@ } } }, + "object.Invitation": { + "title": "Invitation", + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "code": { + "type": "string" + }, + "createdTime": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "quota": { + "type": "integer", + "format": "int64" + }, + "signupGroup": { + "type": "string" + }, + "state": { + "type": "string" + }, + "updatedTime": { + "type": "string" + }, + "usedCount": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + } + } + }, "object.Ldap": { "title": "Ldap", "type": "object", @@ -6769,6 +7019,21 @@ } } }, + "object.SigninMethod": { + "title": "SigninMethod", + "type": "object", + "properties": { + "displayName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rule": { + "type": "string" + } + } + }, "object.SignupItem": { "title": "SignupItem", "type": "object", @@ -6785,6 +7050,9 @@ "prompted": { "type": "boolean" }, + "regex": { + "type": "string" + }, "required": { "type": "boolean" }, @@ -7633,6 +7901,22 @@ ], "example": "Paid" }, + "protocol.CredentialAssertion": { + "title": "CredentialAssertion", + "type": "object" + }, + "protocol.CredentialAssertionResponse": { + "title": "CredentialAssertionResponse", + "type": "object" + }, + "protocol.CredentialCreation": { + "title": "CredentialCreation", + "type": "object" + }, + "protocol.CredentialCreationResponse": { + "title": "CredentialCreationResponse", + "type": "object" + }, "util.SystemInfo": { "title": "SystemInfo", "type": "object", diff --git a/swagger/swagger.yml b/swagger/swagger.yml index 1e3a7923..d9ce0c26 100644 --- a/swagger/swagger.yml +++ b/swagger/swagger.yml @@ -31,6 +31,17 @@ paths: description: "" schema: $ref: '#/definitions/object.OidcDiscovery' + /api/Callback: + post: + tags: + - Callback API + description: Get Login Error Counts + operationId: ApiController.Callback + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Userinfo' /api/add-adapter: post: tags: @@ -121,6 +132,24 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/add-invitation: + post: + tags: + - Invitation API + description: add invitation + operationId: ApiController.AddInvitation + parameters: + - in: body + name: body + description: The details of the invitation + required: true + schema: + $ref: '#/definitions/object.Invitation' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' /api/add-ldap: post: tags: @@ -442,158 +471,6 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' - /api/api/Callback: - post: - tags: - - Callback API - description: Get Login Error Counts - operationId: ApiController.Callback - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' - /api/api/get-captcha: - get: - tags: - - Login API - operationId: ApiController.GetCaptcha - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' - /api/api/get-captcha-status: - get: - tags: - - Token API - 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-webhook-event: - get: - tags: - - GetWebhookEventType API - operationId: ApiController.GetWebhookEventType - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' - /api/api/reset-email-or-phone: - post: - tags: - - Account API - operationId: ApiController.ResetEmailOrPhone - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' - /api/api/send-email: - post: - tags: - - Service API - description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. - operationId: ApiController.SendEmail - parameters: - - in: query - name: clientId - description: The clientId of the application - required: true - type: string - - in: query - name: clientSecret - description: The clientSecret of the application - required: true - type: string - - in: body - name: from - description: Details of the email request - required: true - schema: - $ref: '#/definitions/controllers.EmailForm' - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/controllers.Response' - /api/api/send-notification: - post: - tags: - - Service API - description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. - operationId: ApiController.SendNotification - parameters: - - in: body - name: from - description: Details of the notification request - required: true - schema: - $ref: '#/definitions/controllers.NotificationForm' - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/controllers.Response' - /api/api/send-sms: - post: - tags: - - Service API - description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. - operationId: ApiController.SendSms - parameters: - - in: query - name: clientId - description: The clientId of the application - required: true - type: string - - in: query - name: clientSecret - description: The clientSecret of the application - required: true - type: string - - in: body - name: from - description: Details of the sms request - required: true - schema: - $ref: '#/definitions/controllers.SmsForm' - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/controllers.Response' - /api/api/verify-code: - post: - tags: - - Verification API - operationId: ApiController.VerifyCode - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' - /api/api/webhook: - post: - tags: - - HandleOfficialAccountEvent API - operationId: ApiController.HandleOfficialAccountEvent - responses: - "200": - description: The Response object - schema: - $ref: '#/definitions/object.Userinfo' /api/batch-enforce: post: tags: @@ -617,6 +494,10 @@ paths: name: modelId description: model id type: string + - in: query + name: owner + description: owner + type: string responses: "200": description: The Response object @@ -744,6 +625,24 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/delete-invitation: + post: + tags: + - Invitation API + description: delete invitation + operationId: ApiController.DeleteInvitation + parameters: + - in: body + name: body + description: The details of the invitation + required: true + schema: + $ref: '#/definitions/object.Invitation' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' /api/delete-ldap: post: tags: @@ -1088,6 +987,10 @@ paths: name: resourceId description: resource id type: string + - in: query + name: owner + description: owner + type: string responses: "200": description: The Response object @@ -1213,6 +1116,33 @@ paths: type: array items: $ref: '#/definitions/object.Application' + /api/get-captcha: + get: + tags: + - Login API + operationId: ApiController.GetCaptcha + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Userinfo' + /api/get-captcha-status: + get: + tags: + - Token API + 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/get-cert: get: tags: @@ -1410,6 +1340,42 @@ paths: type: array items: $ref: '#/definitions/object.Group' + /api/get-invitation: + get: + tags: + - Invitation API + description: get invitation + operationId: ApiController.GetInvitation + parameters: + - in: query + name: id + description: The id ( owner/name ) of the invitation + required: true + type: string + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Invitation' + /api/get-invitations: + get: + tags: + - Invitation API + description: get invitations + operationId: ApiController.GetInvitations + parameters: + - in: query + name: owner + description: The owner of invitations + required: true + type: string + responses: + "200": + description: The Response object + schema: + type: array + items: + $ref: '#/definitions/object.Invitation' /api/get-ldap: get: tags: @@ -2269,6 +2235,16 @@ paths: description: The Response object schema: $ref: '#/definitions/object.Webhook' + /api/get-webhook-event: + get: + tags: + - GetWebhookEventType API + operationId: ApiController.GetWebhookEventType + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Userinfo' /api/get-webhooks: get: tags: @@ -2396,6 +2372,46 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/login/oauth/access_token: + post: + tags: + - Token API + description: get OAuth access token + operationId: ApiController.GetOAuthToken + parameters: + - in: query + name: grant_type + description: OAuth grant type + required: true + type: string + - in: query + name: client_id + description: OAuth client id + required: true + type: string + - in: query + name: client_secret + description: OAuth client secret + required: true + type: string + - in: query + name: code + description: OAuth code + required: true + type: string + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.TokenWrapper' + "400": + description: The Response object + schema: + $ref: '#/definitions/object.TokenError' + "401": + description: The Response object + schema: + $ref: '#/definitions/object.TokenError' /api/login/oauth/introspect: post: description: The introspection endpoint is an OAuth 2.0 endpoint that takes a @@ -2543,6 +2559,16 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/reset-email-or-phone: + post: + tags: + - Account API + operationId: ApiController.ResetEmailOrPhone + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Userinfo' /api/run-syncer: get: tags: @@ -2561,6 +2587,80 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/send-email: + post: + tags: + - Service API + description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. + operationId: ApiController.SendEmail + parameters: + - in: query + name: clientId + description: The clientId of the application + required: true + type: string + - in: query + name: clientSecret + description: The clientSecret of the application + required: true + type: string + - in: body + name: from + description: Details of the email request + required: true + schema: + $ref: '#/definitions/controllers.EmailForm' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' + /api/send-notification: + post: + tags: + - Service API + description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. + operationId: ApiController.SendNotification + parameters: + - in: body + name: from + description: Details of the notification request + required: true + schema: + $ref: '#/definitions/controllers.NotificationForm' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' + /api/send-sms: + post: + tags: + - Service API + description: This API is not for Casdoor frontend to call, it is for Casdoor SDKs. + operationId: ApiController.SendSms + parameters: + - in: query + name: clientId + description: The clientId of the application + required: true + type: string + - in: query + name: clientSecret + description: The clientSecret of the application + required: true + type: string + - in: body + name: from + description: Details of the sms request + required: true + schema: + $ref: '#/definitions/controllers.SmsForm' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' /api/send-verification-code: post: tags: @@ -2778,6 +2878,29 @@ paths: description: The Response object schema: $ref: '#/definitions/controllers.Response' + /api/update-invitation: + post: + tags: + - Invitation API + description: update invitation + operationId: ApiController.UpdateInvitation + parameters: + - in: query + name: id + description: The id ( owner/name ) of the invitation + required: true + type: string + - in: body + name: body + description: The details of the invitation + required: true + schema: + $ref: '#/definitions/object.Invitation' + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' /api/update-ldap: post: tags: @@ -3245,6 +3368,33 @@ paths: description: The Response object schema: $ref: '#/definitions/object.Userinfo' + /api/verify-code: + post: + tags: + - Verification API + operationId: ApiController.VerifyCode + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/object.Userinfo' + /api/verify-invitation: + get: + tags: + - Invitation API + description: verify invitation + operationId: ApiController.VerifyInvitation + parameters: + - in: query + name: id + description: The id ( owner/name ) of the invitation + required: true + type: string + responses: + "200": + description: The Response object + schema: + $ref: '#/definitions/controllers.Response' /api/webauthn/signin/begin: get: tags: @@ -3314,46 +3464,16 @@ paths: description: '"The Response object"' schema: $ref: '#/definitions/controllers.Response' - /apiapi/login/oauth/access_token: + /api/webhook: post: tags: - - Token API - description: get OAuth access token - operationId: ApiController.GetOAuthToken - parameters: - - in: query - name: grant_type - description: OAuth grant type - required: true - type: string - - in: query - name: client_id - description: OAuth client id - required: true - type: string - - in: query - name: client_secret - description: OAuth client secret - required: true - type: string - - in: query - name: code - description: OAuth code - required: true - type: string + - HandleOfficialAccountEvent API + operationId: ApiController.HandleOfficialAccountEvent responses: "200": description: The Response object schema: - $ref: '#/definitions/object.TokenWrapper' - "400": - description: The Response object - schema: - $ref: '#/definitions/object.TokenError' - "401": - description: The Response object - schema: - $ref: '#/definitions/object.TokenError' + $ref: '#/definitions/object.Userinfo' definitions: casbin.Enforcer: title: Enforcer @@ -3546,10 +3666,10 @@ definitions: expireInHours: type: integer format: int64 - failedSigninLimit: + failedSigninFrozenTime: type: integer format: int64 - failedSigninFrozenTime: + failedSigninLimit: type: integer format: int64 forgetUrl: @@ -3606,6 +3726,10 @@ definitions: type: string signinHtml: type: string + signinMethods: + type: array + items: + $ref: '#/definitions/object.SigninMethod' signinUrl: type: string signupHtml: @@ -3624,6 +3748,10 @@ definitions: type: string themeData: $ref: '#/definitions/object.ThemeData' + tokenFields: + type: array + items: + type: string tokenFormat: type: string object.Cert: @@ -3780,6 +3908,40 @@ definitions: type: string username: type: string + object.Invitation: + title: Invitation + type: object + properties: + application: + type: string + code: + type: string + createdTime: + type: string + displayName: + type: string + email: + type: string + name: + type: string + owner: + type: string + phone: + type: string + quota: + type: integer + format: int64 + signupGroup: + type: string + state: + type: string + updatedTime: + type: string + usedCount: + type: integer + format: int64 + username: + type: string object.Ldap: title: Ldap type: object @@ -4455,6 +4617,16 @@ definitions: type: string value: type: string + object.SigninMethod: + title: SigninMethod + type: object + properties: + displayName: + type: string + name: + type: string + rule: + type: string object.SignupItem: title: SignupItem type: object @@ -4467,6 +4639,8 @@ definitions: type: string prompted: type: boolean + regex: + type: string required: type: boolean rule: