Documentation ¶
Index ¶
- Constants
- type ApiController
- func (c *ApiController) AddApplication()
- func (c *ApiController) AddCert()
- func (c *ApiController) AddLdap()
- func (c *ApiController) AddOrganization()
- func (c *ApiController) AddPermission()
- func (c *ApiController) AddProvider()
- func (c *ApiController) AddResource()
- func (c *ApiController) AddRole()
- func (c *ApiController) AddSyncer()
- func (c *ApiController) AddToken()
- func (c *ApiController) AddUser()
- func (c *ApiController) AddWebhook()
- func (c *ApiController) CheckLdapUsersExist()
- func (c *ApiController) CheckUserPassword()
- func (c *ApiController) DeleteApplication()
- func (c *ApiController) DeleteCert()
- func (c *ApiController) DeleteLdap()
- func (c *ApiController) DeleteOrganization()
- func (c *ApiController) DeletePermission()
- func (c *ApiController) DeleteProvider()
- func (c *ApiController) DeleteResource()
- func (c *ApiController) DeleteRole()
- func (c *ApiController) DeleteSyncer()
- func (c *ApiController) DeleteToken()
- func (c *ApiController) DeleteUser()
- func (c *ApiController) DeleteWebhook()
- func (c *ApiController) GetAccount()
- func (c *ApiController) GetApplication()
- func (c *ApiController) GetApplicationLogin()
- func (c *ApiController) GetApplications()
- func (c *ApiController) GetCert()
- func (c *ApiController) GetCerts()
- func (c *ApiController) GetEmailAndPhone()
- func (c *ApiController) GetGlobalUsers()
- func (c *ApiController) GetHumanCheck()
- func (c *ApiController) GetLdap()
- func (c *ApiController) GetLdapUser()
- func (c *ApiController) GetLdaps()
- func (c *ApiController) GetOAuthCode()
- func (c *ApiController) GetOAuthToken()
- func (c *ApiController) GetOrganization()
- func (c *ApiController) GetOrganizations()
- func (c *ApiController) GetPermission()
- func (c *ApiController) GetPermissions()
- func (c *ApiController) GetProvider()
- func (c *ApiController) GetProviderFromContext(category string) (*object.Provider, *object.User, bool)
- func (c *ApiController) GetProviders()
- func (c *ApiController) GetRecords()
- func (c *ApiController) GetRecordsByFilter()
- func (c *ApiController) GetResource()
- func (c *ApiController) GetResources()
- func (c *ApiController) GetRole()
- func (c *ApiController) GetRoles()
- func (c *ApiController) GetSamlLogin()
- func (c *ApiController) GetSessionData() *SessionData
- func (c *ApiController) GetSessionUsername() string
- func (c *ApiController) GetSortedUsers()
- func (c *ApiController) GetSyncer()
- func (c *ApiController) GetSyncers()
- func (c *ApiController) GetToken()
- func (c *ApiController) GetTokens()
- func (c *ApiController) GetUser()
- func (c *ApiController) GetUserApplication()
- func (c *ApiController) GetUserCount()
- func (c *ApiController) GetUsers()
- func (c *ApiController) GetWebhook()
- func (c *ApiController) GetWebhooks()
- func (c *ApiController) HandleLoggedIn(application *object.Application, user *object.User, form *RequestForm) (resp *Response)
- func (c *ApiController) HandleSamlLogin()
- func (c *ApiController) IsGlobalAdmin() bool
- func (c *ApiController) Login()
- func (c *ApiController) Logout()
- func (c *ApiController) RefreshToken()
- func (c *ApiController) RequireSignedIn() (string, bool)
- func (c *ApiController) ResetEmailOrPhone()
- func (c *ApiController) ResponseError(error string, data ...interface{})
- func (c *ApiController) ResponseOk(data ...interface{})
- func (c *ApiController) SendEmail()
- func (c *ApiController) SendSms()
- func (c *ApiController) SendVerificationCode()
- func (c *ApiController) SetPassword()
- func (c *ApiController) SetSessionData(s *SessionData)
- func (c *ApiController) SetSessionUsername(user string)
- func (c *ApiController) Signup()
- func (c *ApiController) SyncLdapUsers()
- func (c *ApiController) Unlink()
- func (c *ApiController) UpdateApplication()
- func (c *ApiController) UpdateCert()
- func (c *ApiController) UpdateLdap()
- func (c *ApiController) UpdateOrganization()
- func (c *ApiController) UpdatePermission()
- func (c *ApiController) UpdateProvider()
- func (c *ApiController) UpdateResource()
- func (c *ApiController) UpdateRole()
- func (c *ApiController) UpdateSyncer()
- func (c *ApiController) UpdateToken()
- func (c *ApiController) UpdateUser()
- func (c *ApiController) UpdateWebhook()
- func (c *ApiController) UploadResource()
- func (c *ApiController) UploadUsers()
- type HumanCheck
- type LdapResp
- type LdapServer
- type LdapSyncResp
- type LinkForm
- type RequestForm
- type Response
- type RootController
- type SessionData
Constants ¶
const ( ResponseTypeLogin = "login" ResponseTypeCode = "code" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiController ¶
type ApiController struct {
beego.Controller
}
controller for handlers under /api uri
func (*ApiController) AddApplication ¶
func (c *ApiController) AddApplication()
AddApplication @Title AddApplication @Tag Application API @Description add an application @Param body body object.Application true "The details of the application" @Success 200 {object} controllers.Response The Response object @router /add-application [post]
func (*ApiController) AddCert ¶ added in v1.8.0
func (c *ApiController) AddCert()
@Title AddCert @Tag Cert API @Description add cert @Param body body object.Cert true "The details of the cert" @Success 200 {object} controllers.Response The Response object @router /add-cert [post]
func (*ApiController) AddLdap ¶
func (c *ApiController) AddLdap()
@Tag Account API @Title AddLdap @router /add-ldap [post]
func (*ApiController) AddOrganization ¶
func (c *ApiController) AddOrganization()
AddOrganization ... @Title AddOrganization @Tag Organization API @Description add organization @Param body body object.Organization true "The details of the organization" @Success 200 {object} controllers.Response The Response object @router /add-organization [post]
func (*ApiController) AddPermission ¶ added in v1.9.0
func (c *ApiController) AddPermission()
@Title AddPermission @Tag Permission API @Description add permission @Param body body object.Permission true "The details of the permission" @Success 200 {object} controllers.Response The Response object @router /add-permission [post]
func (*ApiController) AddProvider ¶
func (c *ApiController) AddProvider()
@Title AddProvider @Tag Provider API @Description add provider @Param body body object.Provider true "The details of the provider" @Success 200 {object} controllers.Response The Response object @router /add-provider [post]
func (*ApiController) AddResource ¶ added in v1.2.0
func (c *ApiController) AddResource()
@Tag Resource API @Title AddResource @router /add-resource [post]
func (*ApiController) AddRole ¶ added in v1.8.1
func (c *ApiController) AddRole()
@Title AddRole @Tag Role API @Description add role @Param body body object.Role true "The details of the role" @Success 200 {object} controllers.Response The Response object @router /add-role [post]
func (*ApiController) AddSyncer ¶ added in v1.3.0
func (c *ApiController) AddSyncer()
@Title AddSyncer @Tag Syncer API @Description add syncer @Param body body object.Syncer true "The details of the syncer" @Success 200 {object} controllers.Response The Response object @router /add-syncer [post]
func (*ApiController) AddToken ¶
func (c *ApiController) AddToken()
AddToken @Title AddToken @Tag Token API @Description add token @Param body body object.Token true "Details of the token" @Success 200 {object} controllers.Response The Response object @router /add-token [post]
func (*ApiController) AddUser ¶
func (c *ApiController) AddUser()
AddUser @Title AddUser @Tag User API @Description add user @Param body body object.User true "The details of the user" @Success 200 {object} controllers.Response The Response object @router /add-user [post]
func (*ApiController) AddWebhook ¶ added in v1.3.0
func (c *ApiController) AddWebhook()
@Title AddWebhook @Tag Webhook API @Description add webhook @Param body body object.Webhook true "The details of the webhook" @Success 200 {object} controllers.Response The Response object @router /add-webhook [post]
func (*ApiController) CheckLdapUsersExist ¶
func (c *ApiController) CheckLdapUsersExist()
@Tag Account API @Title CheckLdapUserExist @router /check-ldap-users-exist [post]
func (*ApiController) CheckUserPassword ¶ added in v1.2.0
func (c *ApiController) CheckUserPassword()
@Title CheckUserPassword @router /check-user-password [post] @Tag User API
func (*ApiController) DeleteApplication ¶
func (c *ApiController) DeleteApplication()
DeleteApplication @Title DeleteApplication @Tag Application API @Description delete an application @Param body body object.Application true "The details of the application" @Success 200 {object} controllers.Response The Response object @router /delete-application [post]
func (*ApiController) DeleteCert ¶ added in v1.8.0
func (c *ApiController) DeleteCert()
@Title DeleteCert @Tag Cert API @Description delete cert @Param body body object.Cert true "The details of the cert" @Success 200 {object} controllers.Response The Response object @router /delete-cert [post]
func (*ApiController) DeleteLdap ¶
func (c *ApiController) DeleteLdap()
@Tag Account API @Title DeleteLdap @router /delete-ldap [post]
func (*ApiController) DeleteOrganization ¶
func (c *ApiController) DeleteOrganization()
DeleteOrganization ... @Title DeleteOrganization @Tag Organization API @Description delete organization @Param body body object.Organization true "The details of the organization" @Success 200 {object} controllers.Response The Response object @router /delete-organization [post]
func (*ApiController) DeletePermission ¶ added in v1.9.0
func (c *ApiController) DeletePermission()
@Title DeletePermission @Tag Permission API @Description delete permission @Param body body object.Permission true "The details of the permission" @Success 200 {object} controllers.Response The Response object @router /delete-permission [post]
func (*ApiController) DeleteProvider ¶
func (c *ApiController) DeleteProvider()
@Title DeleteProvider @Tag Provider API @Description delete provider @Param body body object.Provider true "The details of the provider" @Success 200 {object} controllers.Response The Response object @router /delete-provider [post]
func (*ApiController) DeleteResource ¶ added in v1.2.0
func (c *ApiController) DeleteResource()
@Tag Resource API @Title DeleteResource @router /delete-resource [post]
func (*ApiController) DeleteRole ¶ added in v1.8.1
func (c *ApiController) DeleteRole()
@Title DeleteRole @Tag Role API @Description delete role @Param body body object.Role true "The details of the role" @Success 200 {object} controllers.Response The Response object @router /delete-role [post]
func (*ApiController) DeleteSyncer ¶ added in v1.3.0
func (c *ApiController) DeleteSyncer()
@Title DeleteSyncer @Tag Syncer API @Description delete syncer @Param body body object.Syncer true "The details of the syncer" @Success 200 {object} controllers.Response The Response object @router /delete-syncer [post]
func (*ApiController) DeleteToken ¶
func (c *ApiController) DeleteToken()
DeleteToken @Tag Token API @Title DeleteToken @Description delete token @Param body body object.Token true "Details of the token" @Success 200 {object} controllers.Response The Response object @router /delete-token [post]
func (*ApiController) DeleteUser ¶
func (c *ApiController) DeleteUser()
DeleteUser @Title DeleteUser @Tag User API @Description delete user @Param body body object.User true "The details of the user" @Success 200 {object} controllers.Response The Response object @router /delete-user [post]
func (*ApiController) DeleteWebhook ¶ added in v1.3.0
func (c *ApiController) DeleteWebhook()
@Title DeleteWebhook @Tag Webhook API @Description delete webhook @Param body body object.Webhook true "The details of the webhook" @Success 200 {object} controllers.Response The Response object @router /delete-webhook [post]
func (*ApiController) GetAccount ¶
func (c *ApiController) GetAccount()
GetAccount @Title GetAccount @Tag Account API @Description get the details of the current account @Success 200 {object} controllers.Response The Response object @router /get-account [get]
func (*ApiController) GetApplication ¶
func (c *ApiController) GetApplication()
GetApplication @Title GetApplication @Tag Application API @Description get the detail of an application @Param id query string true "The id of the application." @Success 200 {object} object.Application The Response object @router /get-application [get]
func (*ApiController) GetApplicationLogin ¶
func (c *ApiController) GetApplicationLogin()
GetApplicationLogin ... @Title GetApplicationLogin @Tag Login API @Description get application login @Param clientId query string true "client id" @Param responseType query string true "response type" @Param redirectUri query string true "redirect uri" @Param scope query string true "scope" @Param state query string true "state" @Success 200 {object} controllers.api_controller.Response The Response object @router /update-application [get]
func (*ApiController) GetApplications ¶
func (c *ApiController) GetApplications()
GetApplications @Title GetApplications @Tag Application API @Description get all applications @Param owner query string true "The owner of applications." @Success 200 {array} object.Application The Response object @router /get-applications [get]
func (*ApiController) GetCert ¶ added in v1.8.0
func (c *ApiController) GetCert()
@Title GetCert @Tag Cert API @Description get cert @Param id query string true "The id of the cert" @Success 200 {object} object.Cert The Response object @router /get-cert [get]
func (*ApiController) GetCerts ¶ added in v1.8.0
func (c *ApiController) GetCerts()
GetCerts @Title GetCerts @Tag Cert API @Description get certs @Param owner query string true "The owner of certs" @Success 200 {array} object.Cert The Response object @router /get-certs [get]
func (*ApiController) GetEmailAndPhone ¶
func (c *ApiController) GetEmailAndPhone()
GetEmailAndPhone @Title GetEmailAndPhone @Tag User API @Description get email and phone by username @Param username formData string true "The username of the user" @Param organization formData string true "The organization of the user" @Success 200 {object} controllers.Response The Response object @router /get-email-and-phone [post]
func (*ApiController) GetGlobalUsers ¶
func (c *ApiController) GetGlobalUsers()
GetGlobalUsers @Title GetGlobalUsers @Tag User API @Description get global users @Success 200 {array} object.User The Response object @router /get-global-users [get]
func (*ApiController) GetHumanCheck ¶
func (c *ApiController) GetHumanCheck()
GetHumanCheck ... @Tag Login API @Title GetHumancheck @router /api/get-human-check [get]
func (*ApiController) GetLdap ¶
func (c *ApiController) GetLdap()
@Tag Account API @Title GetLdap @router /get-ldap [post]
func (*ApiController) GetLdapUser ¶
func (c *ApiController) GetLdapUser()
@Tag Account API @Title GetLdapser @router /get-ldap-user [post]
func (*ApiController) GetLdaps ¶
func (c *ApiController) GetLdaps()
@Tag Account API @Title GetLdaps @router /get-ldaps [post]
func (*ApiController) GetOAuthCode ¶ added in v1.3.0
func (c *ApiController) GetOAuthCode()
GetOAuthCode @Title GetOAuthCode @Tag Token API @Description get OAuth code @Param user_id query string true "The id of user" @Param client_id query string true "OAuth client id" @Param response_type query string true "OAuth response type" @Param redirect_uri query string true "OAuth redirect URI" @Param scope query string true "OAuth scope" @Param state query string true "OAuth state" @Success 200 {object} object.TokenWrapper The Response object @router /login/oauth/code [post]
func (*ApiController) GetOAuthToken ¶
func (c *ApiController) GetOAuthToken()
GetOAuthToken @Title GetOAuthToken @Tag Token API @Description get OAuth access token @Param grant_type query string true "OAuth grant type" @Param client_id query string true "OAuth client id" @Param client_secret query string true "OAuth client secret" @Param code query string true "OAuth code" @Success 200 {object} object.TokenWrapper The Response object @router /login/oauth/access_token [post]
func (*ApiController) GetOrganization ¶
func (c *ApiController) GetOrganization()
GetOrganization ... @Title GetOrganization @Tag Organization API @Description get organization @Param id query string true "organization id" @Success 200 {object} object.Organization The Response object @router /get-organization [get]
func (*ApiController) GetOrganizations ¶
func (c *ApiController) GetOrganizations()
GetOrganizations ... @Title GetOrganizations @Tag Organization API @Description get organizations @Param owner query string true "owner" @Success 200 {array} object.Organization The Response object @router /get-organizations [get]
func (*ApiController) GetPermission ¶ added in v1.9.0
func (c *ApiController) GetPermission()
@Title GetPermission @Tag Permission API @Description get permission @Param id query string true "The id of the permission" @Success 200 {object} object.Permission The Response object @router /get-permission [get]
func (*ApiController) GetPermissions ¶ added in v1.9.0
func (c *ApiController) GetPermissions()
GetPermissions @Title GetPermissions @Tag Permission API @Description get permissions @Param owner query string true "The owner of permissions" @Success 200 {array} object.Permission The Response object @router /get-permissions [get]
func (*ApiController) GetProvider ¶
func (c *ApiController) GetProvider()
@Title GetProvider @Tag Provider API @Description get provider @Param id query string true "The id of the provider" @Success 200 {object} object.Provider The Response object @router /get-provider [get]
func (*ApiController) GetProviderFromContext ¶ added in v1.3.0
func (*ApiController) GetProviders ¶
func (c *ApiController) GetProviders()
GetProviders @Title GetProviders @Tag Provider API @Description get providers @Param owner query string true "The owner of providers" @Success 200 {array} object.Provider The Response object @router /get-providers [get]
func (*ApiController) GetRecords ¶
func (c *ApiController) GetRecords()
GetRecords @Title GetRecords @Tag Record API @Description get all records @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {array} object.Records The Response object @router /get-records [get]
func (*ApiController) GetRecordsByFilter ¶
func (c *ApiController) GetRecordsByFilter()
GetRecordsByFilter @Tag Record API @Title GetRecordsByFilter @Description get records by filter @Param body body object.Records true "filter Record message" @Success 200 {array} object.Records The Response object @router /get-records-filter [post]
func (*ApiController) GetResource ¶ added in v1.2.0
func (c *ApiController) GetResource()
@Tag Resource API @Title GetResource @router /get-resource [get]
func (*ApiController) GetResources ¶ added in v1.2.0
func (c *ApiController) GetResources()
@router /get-resources [get] @Tag Resource API @Title GetResources
func (*ApiController) GetRole ¶ added in v1.8.1
func (c *ApiController) GetRole()
@Title GetRole @Tag Role API @Description get role @Param id query string true "The id of the role" @Success 200 {object} object.Role The Response object @router /get-role [get]
func (*ApiController) GetRoles ¶ added in v1.8.1
func (c *ApiController) GetRoles()
GetRoles @Title GetRoles @Tag Role API @Description get roles @Param owner query string true "The owner of roles" @Success 200 {array} object.Role The Response object @router /get-roles [get]
func (*ApiController) GetSamlLogin ¶ added in v1.3.0
func (c *ApiController) GetSamlLogin()
func (*ApiController) GetSessionData ¶
func (c *ApiController) GetSessionData() *SessionData
GetSessionData ...
func (*ApiController) GetSessionUsername ¶
func (c *ApiController) GetSessionUsername() string
GetSessionUsername ...
func (*ApiController) GetSortedUsers ¶ added in v1.3.0
func (c *ApiController) GetSortedUsers()
GetSortedUsers @Title GetSortedUsers @Tag User API @Description @Param owner query string true "The owner of users" @Param sorter query string true "The DB column name to sort by, e.g., created_time" @Param limit query string true "The count of users to return, e.g., 25" @Success 200 {array} object.User The Response object @router /get-sorted-users [get]
func (*ApiController) GetSyncer ¶ added in v1.3.0
func (c *ApiController) GetSyncer()
@Title GetSyncer @Tag Syncer API @Description get syncer @Param id query string true "The id of the syncer" @Success 200 {object} object.Syncer The Response object @router /get-syncer [get]
func (*ApiController) GetSyncers ¶ added in v1.3.0
func (c *ApiController) GetSyncers()
GetSyncers @Title GetSyncers @Tag Syncer API @Description get syncers @Param owner query string true "The owner of syncers" @Success 200 {array} object.Syncer The Response object @router /get-syncers [get]
func (*ApiController) GetToken ¶
func (c *ApiController) GetToken()
GetToken @Title GetToken @Tag Token API @Description get token @Param id query string true "The id of token" @Success 200 {object} object.Token The Response object @router /get-token [get]
func (*ApiController) GetTokens ¶
func (c *ApiController) GetTokens()
GetTokens @Title GetTokens @Tag Token API @Description get tokens @Param owner query string true "The owner of tokens" @Param pageSize query string true "The size of each page" @Param p query string true "The number of the page" @Success 200 {array} object.Token The Response object @router /get-tokens [get]
func (*ApiController) GetUser ¶
func (c *ApiController) GetUser()
GetUser @Title GetUser @Tag User API @Description get user @Param id query string true "The id of the user" @Success 200 {object} object.User The Response object @router /get-user [get]
func (*ApiController) GetUserApplication ¶
func (c *ApiController) GetUserApplication()
GetUserApplication @Title GetUserApplication @Tag Application API @Description get the detail of the user's application @Param id query string true "The id of the user" @Success 200 {object} object.Application The Response object @router /get-user-application [get]
func (*ApiController) GetUserCount ¶ added in v1.3.0
func (c *ApiController) GetUserCount()
GetUserCount @Title GetUserCount @Tag User API @Description @Param owner query string true "The owner of users" @Param isOnline query string true "The filter for query, 1 for online, 0 for offline, empty string for all users" @Success 200 {int} int The count of filtered users for an organization @router /get-user-count [get]
func (*ApiController) GetUsers ¶
func (c *ApiController) GetUsers()
GetUsers @Title GetUsers @Tag User API @Description @Param owner query string true "The owner of users" @Success 200 {array} object.User The Response object @router /get-users [get]
func (*ApiController) GetWebhook ¶ added in v1.3.0
func (c *ApiController) GetWebhook()
@Title GetWebhook @Tag Webhook API @Description get webhook @Param id query string true "The id of the webhook" @Success 200 {object} object.Webhook The Response object @router /get-webhook [get]
func (*ApiController) GetWebhooks ¶ added in v1.3.0
func (c *ApiController) GetWebhooks()
GetWebhooks @Title GetWebhooks @Tag Webhook API @Description get webhooks @Param owner query string true "The owner of webhooks" @Success 200 {array} object.Webhook The Response object @router /get-webhooks [get]
func (*ApiController) HandleLoggedIn ¶
func (c *ApiController) HandleLoggedIn(application *object.Application, user *object.User, form *RequestForm) (resp *Response)
HandleLoggedIn ...
func (*ApiController) HandleSamlLogin ¶ added in v1.3.0
func (c *ApiController) HandleSamlLogin()
func (*ApiController) IsGlobalAdmin ¶ added in v1.10.1
func (c *ApiController) IsGlobalAdmin() bool
func (*ApiController) Login ¶
func (c *ApiController) Login()
Login ... @Title Login @Tag Login API @Description login @Param oAuthParams query string true "oAuth parameters" @Param body body RequestForm true "Login information" @Success 200 {object} controllers.api_controller.Response The Response object @router /login [post]
func (*ApiController) Logout ¶
func (c *ApiController) Logout()
Logout @Title Logout @Tag Login API @Description logout the current user @Success 200 {object} controllers.Response The Response object @router /logout [post]
func (*ApiController) RefreshToken ¶ added in v1.3.0
func (c *ApiController) RefreshToken()
RefreshToken @Title RefreshToken @Description refresh OAuth access token @Param grant_type query string true "OAuth grant type" @Param refresh_token query string true "OAuth refresh token" @Param scope query string true "OAuth scope" @Param client_id query string true "OAuth client id" @Param client_secret query string true "OAuth client secret" @Success 200 {object} object.TokenWrapper The Response object @router /login/oauth/refresh_token [post]
func (*ApiController) RequireSignedIn ¶
func (c *ApiController) RequireSignedIn() (string, bool)
RequireSignedIn ...
func (*ApiController) ResetEmailOrPhone ¶
func (c *ApiController) ResetEmailOrPhone()
ResetEmailOrPhone ... @Tag Account API @Title ResetEmailOrPhone @router /api/reset-email-or-phone [post]
func (*ApiController) ResponseError ¶
func (c *ApiController) ResponseError(error string, data ...interface{})
ResponseError ...
func (*ApiController) ResponseOk ¶
func (c *ApiController) ResponseOk(data ...interface{})
ResponseOk ...
func (*ApiController) SendEmail ¶
func (c *ApiController) SendEmail()
SendEmail @Title SendEmail @Tag Service API @Description This API is not for Casdoor frontend to call, it is for Casdoor SDKs. @Param clientId query string true "The clientId of the application" @Param clientSecret query string true "The clientSecret of the application" @Param body body emailForm true "Details of the email request" @Success 200 {object} Response object @router /api/send-email [post]
func (*ApiController) SendSms ¶
func (c *ApiController) SendSms()
SendSms @Title SendSms @Tag Service API @Description This API is not for Casdoor frontend to call, it is for Casdoor SDKs. @Param clientId query string true "The clientId of the application" @Param clientSecret query string true "The clientSecret of the application" @Param body body smsForm true "Details of the sms request" @Success 200 {object} Response object @router /api/send-sms [post]
func (*ApiController) SendVerificationCode ¶
func (c *ApiController) SendVerificationCode()
SendVerificationCode ... @Title SendVerificationCode @Tag Verification API @router /send-verification-code [post]
func (*ApiController) SetPassword ¶
func (c *ApiController) SetPassword()
SetPassword @Title SetPassword @Tag Account API @Description set password @Param userOwner formData string true "The owner of the user" @Param userName formData string true "The name of the user" @Param oldPassword formData string true "The old password of the user" @Param newPassword formData string true "The new password of the user" @Success 200 {object} controllers.Response The Response object @router /set-password [post]
func (*ApiController) SetSessionData ¶
func (c *ApiController) SetSessionData(s *SessionData)
SetSessionData ...
func (*ApiController) SetSessionUsername ¶
func (c *ApiController) SetSessionUsername(user string)
SetSessionUsername ...
func (*ApiController) Signup ¶
func (c *ApiController) Signup()
Signup @Tag Login API @Title Signup @Description sign up a new user @Param username formData string true "The username to sign up" @Param password formData string true "The password" @Success 200 {object} controllers.Response The Response object @router /signup [post]
func (*ApiController) SyncLdapUsers ¶
func (c *ApiController) SyncLdapUsers()
@Tag Account API @Title SyncLdapUsers @router /sync-ldap-users [post]
func (*ApiController) Unlink ¶
func (c *ApiController) Unlink()
Unlink ... @router /unlink [post] @Tag Login API
func (*ApiController) UpdateApplication ¶
func (c *ApiController) UpdateApplication()
UpdateApplication @Title UpdateApplication @Tag Application API @Description update an application @Param id query string true "The id of the application" @Param body body object.Application true "The details of the application" @Success 200 {object} controllers.Response The Response object @router /update-application [post]
func (*ApiController) UpdateCert ¶ added in v1.8.0
func (c *ApiController) UpdateCert()
@Title UpdateCert @Tag Cert API @Description update cert @Param id query string true "The id of the cert" @Param body body object.Cert true "The details of the cert" @Success 200 {object} controllers.Response The Response object @router /update-cert [post]
func (*ApiController) UpdateLdap ¶
func (c *ApiController) UpdateLdap()
@Tag Account API @Title UpdateLdap @router /update-ldap [post]
func (*ApiController) UpdateOrganization ¶
func (c *ApiController) UpdateOrganization()
UpdateOrganization ... @Title UpdateOrganization @Tag Organization API @Description update organization @Param id query string true "The id of the organization" @Param body body object.Organization true "The details of the organization" @Success 200 {object} controllers.Response The Response object @router /update-organization [post]
func (*ApiController) UpdatePermission ¶ added in v1.9.0
func (c *ApiController) UpdatePermission()
@Title UpdatePermission @Tag Permission API @Description update permission @Param id query string true "The id of the permission" @Param body body object.Permission true "The details of the permission" @Success 200 {object} controllers.Response The Response object @router /update-permission [post]
func (*ApiController) UpdateProvider ¶
func (c *ApiController) UpdateProvider()
@Title UpdateProvider @Tag Provider API @Description update provider @Param id query string true "The id of the provider" @Param body body object.Provider true "The details of the provider" @Success 200 {object} controllers.Response The Response object @router /update-provider [post]
func (*ApiController) UpdateResource ¶ added in v1.2.0
func (c *ApiController) UpdateResource()
@Tag Resource API @Title UpdateResource @router /update-resource [post]
func (*ApiController) UpdateRole ¶ added in v1.8.1
func (c *ApiController) UpdateRole()
@Title UpdateRole @Tag Role API @Description update role @Param id query string true "The id of the role" @Param body body object.Role true "The details of the role" @Success 200 {object} controllers.Response The Response object @router /update-role [post]
func (*ApiController) UpdateSyncer ¶ added in v1.3.0
func (c *ApiController) UpdateSyncer()
@Title UpdateSyncer @Tag Syncer API @Description update syncer @Param id query string true "The id of the syncer" @Param body body object.Syncer true "The details of the syncer" @Success 200 {object} controllers.Response The Response object @router /update-syncer [post]
func (*ApiController) UpdateToken ¶
func (c *ApiController) UpdateToken()
UpdateToken @Title UpdateToken @Tag Token API @Description update token @Param id query string true "The id of token" @Param body body object.Token true "Details of the token" @Success 200 {object} controllers.Response The Response object @router /update-token [post]
func (*ApiController) UpdateUser ¶
func (c *ApiController) UpdateUser()
UpdateUser @Title UpdateUser @Tag User API @Description update user @Param id query string true "The id of the user" @Param body body object.User true "The details of the user" @Success 200 {object} controllers.Response The Response object @router /update-user [post]
func (*ApiController) UpdateWebhook ¶ added in v1.3.0
func (c *ApiController) UpdateWebhook()
@Title UpdateWebhook @Tag Webhook API @Description update webhook @Param id query string true "The id of the webhook" @Param body body object.Webhook true "The details of the webhook" @Success 200 {object} controllers.Response The Response object @router /update-webhook [post]
func (*ApiController) UploadResource ¶ added in v1.2.0
func (c *ApiController) UploadResource()
@Tag Resource API @Title UploadResource @router /upload-resource [post]
func (*ApiController) UploadUsers ¶ added in v1.8.0
func (c *ApiController) UploadUsers()
type HumanCheck ¶
type LdapResp ¶
type LdapResp struct { //Groups []LdapRespGroup `json:"groups"` Users []object.LdapRespUser `json:"users"` }
type LdapServer ¶
type LdapSyncResp ¶
type LdapSyncResp struct { Exist []object.LdapRespUser `json:"exist"` Failed []object.LdapRespUser `json:"failed"` }
type RequestForm ¶
type RequestForm struct { Type string `json:"type"` Organization string `json:"organization"` Username string `json:"username"` Password string `json:"password"` Name string `json:"name"` Email string `json:"email"` Phone string `json:"phone"` Affiliation string `json:"affiliation"` IdCard string `json:"idCard"` Region string `json:"region"` Application string `json:"application"` Provider string `json:"provider"` Code string `json:"code"` State string `json:"state"` RedirectUri string `json:"redirectUri"` Method string `json:"method"` EmailCode string `json:"emailCode"` PhoneCode string `json:"phoneCode"` PhonePrefix string `json:"phonePrefix"` AutoSignin bool `json:"autoSignin"` RelayState string `json:"relayState"` SamlResponse string `json:"samlResponse"` }
type RootController ¶ added in v1.3.0
type RootController struct {
ApiController
}
controller for handlers directly under / (root)
func (*RootController) GetOidcCert ¶ added in v1.3.0
func (c *RootController) GetOidcCert()
@Title GetOidcCert @Tag OIDC API @router /api/certs [get]
func (*RootController) GetOidcDiscovery ¶ added in v1.3.0
func (c *RootController) GetOidcDiscovery()
@Title GetOidcDiscovery @Tag OIDC API @router /.well-known/openid-configuration [get]
type SessionData ¶
type SessionData struct {
ExpireTime int64
}