controllers

package
v1.405.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 33 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ResponseTypeLogin   = "login"
	ResponseTypeCode    = "code"
	ResponseTypeToken   = "token"
	ResponseTypeIdToken = "id_token"
	ResponseTypeSaml    = "saml"
	ResponseTypeCas     = "cas"
)
View Source
const (
	InvalidRequest           string = "INVALID_REQUEST"
	InvalidTicketSpec        string = "INVALID_TICKET_SPEC"
	UnauthorizedServiceProxy string = "UNAUTHORIZED_SERVICE_PROXY"
	InvalidProxyCallback     string = "INVALID_PROXY_CALLBACK"
	InvalidTicket            string = "INVALID_TICKET"
	InvalidService           string = "INVALID_SERVICE"
	InternalError            string = "INTERNAL_ERROR"
	UnauthorizedService      string = "UNAUTHORIZED_SERVICE"
)
View Source
const (
	SignupVerification   = "signup"
	ResetVerification    = "reset"
	LoginVerification    = "login"
	ForgetVerification   = "forget"
	MfaSetupVerification = "mfaSetup"
	MfaAuthVerification  = "mfaAuth"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiController

type ApiController struct {
	beego.Controller
}

ApiController controller for handlers under /api uri

func (*ApiController) AddAdapter added in v1.377.0

func (c *ApiController) AddAdapter()

AddAdapter @Title AddAdapter @Tag Adapter API @Description add adapter @Param body body object.Adapter true "The details of the adapter" @Success 200 {object} controllers.Response The Response object @router /add-adapter [post]

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

func (c *ApiController) AddCert()

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) AddEnforcer added in v1.374.0

func (c *ApiController) AddEnforcer()

AddEnforcer @Title AddEnforcer @Tag Enforcer API @Description add enforcer @Param enforcer body object true "The enforcer object" @Success 200 {object} object @router /add-enforcer [post]

func (*ApiController) AddGroup added in v1.335.0

func (c *ApiController) AddGroup()

AddGroup @Title AddGroup @Tag Group API @Description add group @Param body body object.Group true "The details of the group" @Success 200 {object} controllers.Response The Response object @router /add-group [post]

func (*ApiController) AddLdap

func (c *ApiController) AddLdap()

AddLdap @Title AddLdap @Tag Account API @Description add ldap @Param body body object.Ldap true "The details of the ldap" @Success 200 {object} controllers.Response The Response object @router /add-ldap [post]

func (*ApiController) AddModel added in v1.54.0

func (c *ApiController) AddModel()

AddModel @Title AddModel @Tag Model API @Description add model @Param body body object.Model true "The details of the model" @Success 200 {object} controllers.Response The Response object @router /add-model [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) AddPayment added in v1.16.0

func (c *ApiController) AddPayment()

AddPayment @Title AddPayment @Tag Payment API @Description add payment @Param body body object.Payment true "The details of the payment" @Success 200 {object} controllers.Response The Response object @router /add-payment [post]

func (*ApiController) AddPermission

func (c *ApiController) AddPermission()

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) AddPlan added in v1.320.0

func (c *ApiController) AddPlan()

AddPlan @Title AddPlan @Tag Plan API @Description add plan @Param body body object.Plan true "The details of the plan" @Success 200 {object} controllers.Response The Response object @router /add-plan [post]

func (*ApiController) AddPolicy added in v1.166.0

func (c *ApiController) AddPolicy()

func (*ApiController) AddPricing added in v1.320.0

func (c *ApiController) AddPricing()

AddPricing @Title AddPricing @Tag Pricing API @Description add pricing @Param body body object.Pricing true "The details of the pricing" @Success 200 {object} controllers.Response The Response object @router /add-pricing [post]

func (*ApiController) AddProduct added in v1.23.0

func (c *ApiController) AddProduct()

AddProduct @Title AddProduct @Tag Product API @Description add product @Param body body object.Product true "The details of the product" @Success 200 {object} controllers.Response The Response object @router /add-product [post]

func (*ApiController) AddProvider

func (c *ApiController) AddProvider()

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

func (c *ApiController) AddResource()

AddResource @Tag Resource API @Title AddResource @Param resource body object.Resource true "Resource object" @Success 200 {object} controllers.Response Success or error @router /add-resource [post]

func (*ApiController) AddRole

func (c *ApiController) AddRole()

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) AddSession added in v1.239.0

func (c *ApiController) AddSession()

AddSession @Title AddSession @Tag Session API @Description Add session for one user in one application. If there are other existing sessions, join the session into the list. @Param id query string true "The id(organization/application/user) of session" @Param sessionId query string true "sessionId to be added" @Success 200 {array} string The Response object @router /add-session [post]

func (*ApiController) AddSubscription added in v1.320.0

func (c *ApiController) AddSubscription()

AddSubscription @Title AddSubscription @Tag Subscription API @Description add subscription @Param body body object.Subscription true "The details of the subscription" @Success 200 {object} controllers.Response The Response object @router /add-subscription [post]

func (*ApiController) AddSyncer

func (c *ApiController) AddSyncer()

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) AddUserkeys added in v1.337.0

func (c *ApiController) AddUserkeys()

AddUserkeys @Title AddUserkeys @router /add-user-keys [post] @Tag User API

func (*ApiController) AddWebhook

func (c *ApiController) AddWebhook()

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) BatchEnforce added in v1.83.0

func (c *ApiController) BatchEnforce()

BatchEnforce @Title BatchEnforce @Tag Enforce API @Description Call Casbin BatchEnforce API @Param body body object.CasbinRequest true "array of casbin requests" @Param permissionId query string false "permission id" @Param modelId query string false "model id" @Success 200 {object} controllers.Response The Response object @router /batch-enforce [post]

func (*ApiController) BuyProduct added in v1.27.6

func (c *ApiController) BuyProduct()

BuyProduct @Title BuyProduct @Tag Product API @Description buy product @Param id query string true "The id ( owner/name ) of the product" @Param providerName query string true "The name of the provider" @Success 200 {object} controllers.Response The Response object @router /buy-product [post]

func (*ApiController) CheckUserPassword

func (c *ApiController) CheckUserPassword()

CheckUserPassword @Title CheckUserPassword @router /check-user-password [post] @Tag User API

func (*ApiController) ClearUserSession added in v1.147.0

func (c *ApiController) ClearUserSession()

func (*ApiController) DeleteAdapter added in v1.377.0

func (c *ApiController) DeleteAdapter()

DeleteAdapter @Title DeleteAdapter @Tag Adapter API @Description delete adapter @Param body body object.Adapter true "The details of the adapter" @Success 200 {object} controllers.Response The Response object @router /delete-adapter [post]

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

func (c *ApiController) DeleteCert()

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) DeleteEnforcer added in v1.374.0

func (c *ApiController) DeleteEnforcer()

DeleteEnforcer @Title DeleteEnforcer @Tag Enforcer API @Description delete enforcer @Param body body object.Enforce true "The enforcer object" @Success 200 {object} object @router /delete-enforcer [post]

func (*ApiController) DeleteGroup added in v1.335.0

func (c *ApiController) DeleteGroup()

DeleteGroup @Title DeleteGroup @Tag Group API @Description delete group @Param body body object.Group true "The details of the group" @Success 200 {object} controllers.Response The Response object @router /delete-group [post]

func (*ApiController) DeleteLdap

func (c *ApiController) DeleteLdap()

DeleteLdap @Title DeleteLdap @Tag Account API @Description delete ldap @Param body body object.Ldap true "The details of the ldap" @Success 200 {object} controllers.Response The Response object @router /delete-ldap [post]

func (*ApiController) DeleteMfa added in v1.309.0

func (c *ApiController) DeleteMfa()

DeleteMfa @Title DeleteMfa @Tag MFA API @Description: Delete MFA @param owner form string true "owner of user" @param name form string true "name of user" @Success 200 {object} Response object @router /delete-mfa/ [post]

func (*ApiController) DeleteModel added in v1.54.0

func (c *ApiController) DeleteModel()

DeleteModel @Title DeleteModel @Tag Model API @Description delete model @Param body body object.Model true "The details of the model" @Success 200 {object} controllers.Response The Response object @router /delete-model [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) DeletePayment added in v1.16.0

func (c *ApiController) DeletePayment()

DeletePayment @Title DeletePayment @Tag Payment API @Description delete payment @Param body body object.Payment true "The details of the payment" @Success 200 {object} controllers.Response The Response object @router /delete-payment [post]

func (*ApiController) DeletePermission

func (c *ApiController) DeletePermission()

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) DeletePlan added in v1.320.0

func (c *ApiController) DeletePlan()

DeletePlan @Title DeletePlan @Tag Plan API @Description delete plan @Param body body object.Plan true "The details of the plan" @Success 200 {object} controllers.Response The Response object @router /delete-plan [post]

func (*ApiController) DeletePricing added in v1.320.0

func (c *ApiController) DeletePricing()

DeletePricing @Title DeletePricing @Tag Pricing API @Description delete pricing @Param body body object.Pricing true "The details of the pricing" @Success 200 {object} controllers.Response The Response object @router /delete-pricing [post]

func (*ApiController) DeleteProduct added in v1.23.0

func (c *ApiController) DeleteProduct()

DeleteProduct @Title DeleteProduct @Tag Product API @Description delete product @Param body body object.Product true "The details of the product" @Success 200 {object} controllers.Response The Response object @router /delete-product [post]

func (*ApiController) DeleteProvider

func (c *ApiController) DeleteProvider()

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

func (c *ApiController) DeleteResource()

DeleteResource @Tag Resource API @Title DeleteResource @Param resource body object.Resource true "Resource object" @Success 200 {object} controllers.Response Success or error @router /delete-resource [post]

func (*ApiController) DeleteRole

func (c *ApiController) DeleteRole()

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) DeleteSession added in v1.207.0

func (c *ApiController) DeleteSession()

DeleteSession @Title DeleteSession @Tag Session API @Description Delete session for one user in one application. @Param id query string true "The id(organization/application/user) of session" @Success 200 {array} string The Response object @router /delete-session [post]

func (*ApiController) DeleteSubscription added in v1.320.0

func (c *ApiController) DeleteSubscription()

DeleteSubscription @Title DeleteSubscription @Tag Subscription API @Description delete subscription @Param body body object.Subscription true "The details of the subscription" @Success 200 {object} controllers.Response The Response object @router /delete-subscription [post]

func (*ApiController) DeleteSyncer

func (c *ApiController) DeleteSyncer()

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

func (c *ApiController) DeleteWebhook()

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) Enforce added in v1.83.0

func (c *ApiController) Enforce()

Enforce @Title Enforce @Tag Enforce API @Description Call Casbin Enforce API @Param body body object.CasbinRequest true "Casbin request" @Param permissionId query string false "permission id" @Param modelId query string false "model id" @Param resourceId query string false "resource id" @Success 200 {object} controllers.Response The Response object @router /enforce [post]

func (*ApiController) Finish added in v1.306.0

func (c *ApiController) Finish()

func (*ApiController) GetAcceptLanguage added in v1.141.0

func (c *ApiController) GetAcceptLanguage() string

GetAcceptLanguage ...

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) GetAdapter added in v1.377.0

func (c *ApiController) GetAdapter()

GetAdapter @Title GetAdapter @Tag Adapter API @Description get adapter @Param id query string true "The id ( owner/name ) of the adapter" @Success 200 {object} object.Adapter The Response object @router /get-adapter [get]

func (*ApiController) GetAdapters added in v1.377.0

func (c *ApiController) GetAdapters()

GetAdapters @Title GetAdapters @Tag Adapter API @Description get adapters @Param owner query string true "The owner of adapters" @Success 200 {array} object.Adapter The Response object @router /get-adapters [get]

func (*ApiController) GetAllActions added in v1.83.0

func (c *ApiController) GetAllActions()

func (*ApiController) GetAllObjects added in v1.83.0

func (c *ApiController) GetAllObjects()

func (*ApiController) GetAllRoles added in v1.83.0

func (c *ApiController) GetAllRoles()

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 ( owner/name ) 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} Response The Response object @router /get-app-login [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) GetCaptcha added in v1.57.0

func (c *ApiController) GetCaptcha()

GetCaptcha ... @Tag Login API @Title GetCaptcha @router /api/get-captcha [get]

func (*ApiController) GetCaptchaStatus added in v1.301.0

func (c *ApiController) GetCaptchaStatus()

GetCaptchaStatus @Title GetCaptchaStatus @Tag Token API @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]

func (*ApiController) GetCert

func (c *ApiController) GetCert()

GetCert @Title GetCert @Tag Cert API @Description get cert @Param id query string true "The id ( owner/name ) of the cert" @Success 200 {object} object.Cert The Response object @router /get-cert [get]

func (*ApiController) GetCerts

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) GetDashboard added in v1.389.0

func (c *ApiController) GetDashboard()

GetDashboard @Title GetDashboard @Tag GetDashboard API @Description get information of dashboard @Success 200 {object} controllers.Response The Response object @router /get-dashboard [get]

func (*ApiController) GetDefaultApplication added in v1.114.0

func (c *ApiController) GetDefaultApplication()

GetDefaultApplication ... @Title GetDefaultApplication @Tag Organization API @Description get default application @Param id query string true "organization id" @Success 200 {object} Response The Response object @router /get-default-application [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 [get]

func (*ApiController) GetEnforcer added in v1.374.0

func (c *ApiController) GetEnforcer()

GetEnforcer @Title GetEnforcer @Tag Enforcer API @Description get enforcer @Param id query string true "The id ( owner/name ) of enforcer" @Success 200 {object} object @router /get-enforcer [get]

func (*ApiController) GetEnforcers added in v1.374.0

func (c *ApiController) GetEnforcers()

GetEnforcers @Title GetEnforcers @Tag Enforcer API @Description get enforcers @Param owner query string true "The owner of enforcers" @Success 200 {array} object.Enforcer @router /get-enforcers [get]

func (*ApiController) GetGlobalProviders added in v1.151.0

func (c *ApiController) GetGlobalProviders()

GetGlobalProviders @Title GetGlobalProviders @Tag Provider API @Description get Global providers @Success 200 {array} object.Provider The Response object @router /get-global-providers [get]

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) GetGlobleCerts added in v1.312.0

func (c *ApiController) GetGlobleCerts()

GetGlobleCerts @Title GetGlobleCerts @Tag Cert API @Description get globle certs @Success 200 {array} object.Cert The Response object @router /get-globle-certs [get]

func (*ApiController) GetGroup added in v1.335.0

func (c *ApiController) GetGroup()

GetGroup @Title GetGroup @Tag Group API @Description get group @Param id query string true "The id ( owner/name ) of the group" @Success 200 {object} object.Group The Response object @router /get-group [get]

func (*ApiController) GetGroups added in v1.335.0

func (c *ApiController) GetGroups()

GetGroups @Title GetGroups @Tag Group API @Description get groups @Param owner query string true "The owner of groups" @Success 200 {array} object.Group The Response object @router /get-groups [get]

func (*ApiController) GetLdap

func (c *ApiController) GetLdap()

GetLdap @Title GetLdap @Tag Account API @Description get ldap @Param id query string true "id" @Success 200 {object} object.Ldap The Response object @router /get-ldap [get]

func (*ApiController) GetLdapUsers added in v1.267.0

func (c *ApiController) GetLdapUsers()

GetLdapUsers @Title GetLdapser @Tag Account API @Description get ldap users Param id string true "id" @Success 200 {object} LdapResp The Response object @router /get-ldap-users [get]

func (*ApiController) GetLdaps

func (c *ApiController) GetLdaps()

GetLdaps @Title GetLdaps @Tag Account API @Description get ldaps @Param owner query string false "owner" @Success 200 {array} object.Ldap The Response object @router /get-ldaps [get]

func (*ApiController) GetModel added in v1.54.0

func (c *ApiController) GetModel()

GetModel @Title GetModel @Tag Model API @Description get model @Param id query string true "The id ( owner/name ) of the model" @Success 200 {object} object.Model The Response object @router /get-model [get]

func (*ApiController) GetModels added in v1.54.0

func (c *ApiController) GetModels()

GetModels @Title GetModels @Tag Model API @Description get models @Param owner query string true "The owner of models" @Success 200 {array} object.Model The Response object @router /get-models [get]

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 @Success 400 {object} object.TokenError The Response object @Success 401 {object} object.TokenError 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) GetOrganizationApplications added in v1.82.1

func (c *ApiController) GetOrganizationApplications()

GetOrganizationApplications @Title GetOrganizationApplications @Tag Application API @Description get the detail of the organization's application @Param organization query string true "The organization name" @Success 200 {array} object.Application The Response object @router /get-organization-applications [get]

func (*ApiController) GetOrganizationNames added in v1.324.0

func (c *ApiController) GetOrganizationNames()

GetOrganizationNames ... @Title GetOrganizationNames @Tag Organization API @Param owner query string true "owner" @Description get all organization name and displayName @Success 200 {array} object.Organization The Response object @router /get-organization-names [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) GetPayment added in v1.16.0

func (c *ApiController) GetPayment()

GetPayment @Title GetPayment @Tag Payment API @Description get payment @Param id query string true "The id ( owner/name ) of the payment" @Success 200 {object} object.Payment The Response object @router /get-payment [get]

func (*ApiController) GetPayments added in v1.16.0

func (c *ApiController) GetPayments()

GetPayments @Title GetPayments @Tag Payment API @Description get payments @Param owner query string true "The owner of payments" @Success 200 {array} object.Payment The Response object @router /get-payments [get]

func (*ApiController) GetPermission

func (c *ApiController) GetPermission()

GetPermission @Title GetPermission @Tag Permission API @Description get permission @Param id query string true "The id ( owner/name ) of the permission" @Success 200 {object} object.Permission The Response object @router /get-permission [get]

func (*ApiController) GetPermissions

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) GetPermissionsByRole added in v1.170.0

func (c *ApiController) GetPermissionsByRole()

GetPermissionsByRole @Title GetPermissionsByRole @Tag Permission API @Description get permissions by role @Param id query string true "The id ( owner/name ) of the role" @Success 200 {array} object.Permission The Response object @router /get-permissions-by-role [get]

func (*ApiController) GetPermissionsBySubmitter added in v1.88.1

func (c *ApiController) GetPermissionsBySubmitter()

GetPermissionsBySubmitter @Title GetPermissionsBySubmitter @Tag Permission API @Description get permissions by submitter @Success 200 {array} object.Permission The Response object @router /get-permissions-by-submitter [get]

func (*ApiController) GetPlan added in v1.320.0

func (c *ApiController) GetPlan()

GetPlan @Title GetPlan @Tag Plan API @Description get plan @Param id query string true "The id ( owner/name ) of the plan" @Param includeOption query bool false "Should include plan's option" @Success 200 {object} object.Plan The Response object @router /get-plan [get]

func (*ApiController) GetPlans added in v1.320.0

func (c *ApiController) GetPlans()

GetPlans @Title GetPlans @Tag Plan API @Description get plans @Param owner query string true "The owner of plans" @Success 200 {array} object.Plan The Response object @router /get-plans [get]

func (*ApiController) GetPolicies added in v1.377.1

func (c *ApiController) GetPolicies()

func (*ApiController) GetPricing added in v1.320.0

func (c *ApiController) GetPricing()

GetPricing @Title GetPricing @Tag Pricing API @Description get pricing @Param id query string true "The id ( owner/name ) of the pricing" @Success 200 {object} object.Pricing The Response object @router /get-pricing [get]

func (*ApiController) GetPricings added in v1.320.0

func (c *ApiController) GetPricings()

GetPricings @Title GetPricings @Tag Pricing API @Description get pricings @Param owner query string true "The owner of pricings" @Success 200 {array} object.Pricing The Response object @router /get-pricings [get]

func (*ApiController) GetProduct added in v1.23.0

func (c *ApiController) GetProduct()

GetProduct @Title GetProduct @Tag Product API @Description get product @Param id query string true "The id ( owner/name ) of the product" @Success 200 {object} object.Product The Response object @router /get-product [get]

func (*ApiController) GetProducts added in v1.23.0

func (c *ApiController) GetProducts()

GetProducts @Title GetProducts @Tag Product API @Description get products @Param owner query string true "The owner of products" @Success 200 {array} object.Product The Response object @router /get-products [get]

func (*ApiController) GetPrometheusInfo added in v1.303.0

func (c *ApiController) GetPrometheusInfo()

GetPrometheusInfo @Title GetPrometheusInfo @Tag Prometheus API @Description get Prometheus Info @Success 200 {object} object.PrometheusInfo The Response object @router /get-prometheus-info [get]

func (*ApiController) GetProvider

func (c *ApiController) GetProvider()

GetProvider @Title GetProvider @Tag Provider API @Description get provider @Param id query string true "The id ( owner/name ) of the provider" @Success 200 {object} object.Provider The Response object @router /get-provider [get]

func (*ApiController) GetProviderFromContext

func (c *ApiController) GetProviderFromContext(category string) (*object.Provider, error)

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) GetResource

func (c *ApiController) GetResource()

GetResource @Tag Resource API @Title GetResource @Description get resource @Param id query string true "The id ( owner/name ) of resource" @Success 200 {object} object.Resource The Response object @router /get-resource [get]

func (*ApiController) GetResources

func (c *ApiController) GetResources()

GetResources @Tag Resource API @Title GetResources @Description get resources @Param owner query string true "Owner" @Param user query string true "User" @Param pageSize query integer false "Page Size" @Param p query integer false "Page Number" @Param field query string false "Field" @Param value query string false "Value" @Param sortField query string false "Sort Field" @Param sortOrder query string false "Sort Order" @Success 200 {array} object.Resource The Response object @router /get-resources [get]

func (*ApiController) GetRole

func (c *ApiController) GetRole()

GetRole @Title GetRole @Tag Role API @Description get role @Param id query string true "The id ( owner/name ) of the role" @Success 200 {object} object.Role The Response object @router /get-role [get]

func (*ApiController) GetRoles

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

func (c *ApiController) GetSamlLogin()

func (*ApiController) GetSamlMeta added in v1.38.0

func (c *ApiController) GetSamlMeta()

func (*ApiController) GetSessionApplication added in v1.30.2

func (c *ApiController) GetSessionApplication() *object.Application

func (*ApiController) GetSessionData

func (c *ApiController) GetSessionData() *SessionData

GetSessionData ...

func (*ApiController) GetSessionOidc added in v1.13.0

func (c *ApiController) GetSessionOidc() (string, string)

func (*ApiController) GetSessionUsername

func (c *ApiController) GetSessionUsername() string

GetSessionUsername ...

func (*ApiController) GetSessions added in v1.207.0

func (c *ApiController) GetSessions()

GetSessions @Title GetSessions @Tag Session API @Description Get organization user sessions. @Param owner query string true "The organization name" @Success 200 {array} string The Response object @router /get-sessions [get]

func (*ApiController) GetSingleSession added in v1.239.0

func (c *ApiController) GetSingleSession()

GetSingleSession @Title GetSingleSession @Tag Session API @Description Get session for one user in one application. @Param id query string true "The id(organization/application/user) of session" @Success 200 {array} string The Response object @router /get-session [get]

func (*ApiController) GetSortedUsers

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) GetSubscription added in v1.320.0

func (c *ApiController) GetSubscription()

GetSubscription @Title GetSubscription @Tag Subscription API @Description get subscription @Param id query string true "The id ( owner/name ) of the subscription" @Success 200 {object} object.Subscription The Response object @router /get-subscription [get]

func (*ApiController) GetSubscriptions added in v1.320.0

func (c *ApiController) GetSubscriptions()

GetSubscriptions @Title GetSubscriptions @Tag Subscription API @Description get subscriptions @Param owner query string true "The owner of subscriptions" @Success 200 {array} object.Subscription The Response object @router /get-subscriptions [get]

func (*ApiController) GetSyncer

func (c *ApiController) GetSyncer()

GetSyncer @Title GetSyncer @Tag Syncer API @Description get syncer @Param id query string true "The id ( owner/name ) of the syncer" @Success 200 {object} object.Syncer The Response object @router /get-syncer [get]

func (*ApiController) GetSyncers

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) GetSystemInfo added in v1.96.0

func (c *ApiController) GetSystemInfo()

GetSystemInfo @Title GetSystemInfo @Tag System API @Description get system info like CPU and memory usage @Success 200 {object} util.SystemInfo The Response object @router /get-system-info [get]

func (*ApiController) GetToken

func (c *ApiController) GetToken()

GetToken @Title GetToken @Tag Token API @Description get token @Param id query string true "The id ( owner/name ) 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 false "The id ( owner/name ) of the user" @Param owner query string false "The owner of the user" @Param email query string false "The email of the user" @Param phone query string false "The phone of the user" @Param userId query string false "The userId 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 ( owner/name ) of the user" @Success 200 {object} object.Application The Response object @router /get-user-application [get]

func (*ApiController) GetUserCount

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) GetUserPayments added in v1.29.0

func (c *ApiController) GetUserPayments()

GetUserPayments @Title GetUserPayments @Tag Payment API @Description get payments for a user @Param owner query string true "The owner of payments" @Param organization query string true "The organization of the user" @Param user query string true "The username of the user" @Success 200 {array} object.Payment The Response object @router /get-user-payments [get]

func (*ApiController) GetUserinfo added in v1.13.0

func (c *ApiController) GetUserinfo()

GetUserinfo UserInfo @Title UserInfo @Tag Account API @Description return user information according to OIDC standards @Success 200 {object} object.Userinfo The Response object @router /userinfo [get]

func (*ApiController) GetUserinfo2 added in v1.278.0

func (c *ApiController) GetUserinfo2()

GetUserinfo2 LaravelResponse @Title UserInfo2 @Tag Account API @Description return Laravel compatible user information according to OAuth 2.0 @Success 200 {object} LaravelResponse The Response object @router /user [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) GetVersionInfo added in v1.265.0

func (c *ApiController) GetVersionInfo()

GetVersionInfo @Title GetVersionInfo @Tag System API @Description get version info like Casdoor release version and commit ID @Success 200 {object} util.VersionInfo The Response object @router /get-version-info [get]

func (*ApiController) GetWebhook

func (c *ApiController) GetWebhook()

GetWebhook @Title GetWebhook @Tag Webhook API @Description get webhook @Param id query string built-in/admin true "The id ( owner/name ) of the webhook" @Success 200 {object} object.Webhook The Response object @router /get-webhook [get]

func (*ApiController) GetWebhookEventType added in v1.156.0

func (c *ApiController) GetWebhookEventType()

GetWebhookEventType ... @Tag GetWebhookEventType API @Title GetWebhookEventType @router /api/get-webhook-event [GET]

func (*ApiController) GetWebhooks

func (c *ApiController) GetWebhooks()

GetWebhooks @Title GetWebhooks @Tag Webhook API @Description get webhooks @Param owner query string built-in/admin true "The owner of webhooks" @Success 200 {array} object.Webhook The Response object @router /get-webhooks [get] @Security test_apiKey

func (*ApiController) HandleLoggedIn

func (c *ApiController) HandleLoggedIn(application *object.Application, user *object.User, form *form.AuthForm) (resp *Response)

HandleLoggedIn ...

func (*ApiController) HandleOfficialAccountEvent added in v1.156.0

func (c *ApiController) HandleOfficialAccountEvent()

HandleOfficialAccountEvent ... @Tag HandleOfficialAccountEvent API @Title HandleOfficialAccountEvent @router /api/webhook [POST]

func (*ApiController) HandleSamlLogin

func (c *ApiController) HandleSamlLogin()

func (*ApiController) Health added in v1.315.0

func (c *ApiController) Health()

Health @Title Health @Tag System API @Description check if the system is live @Success 200 {object} controllers.Response The Response object @router /health [get]

func (*ApiController) IntrospectToken added in v1.26.0

func (c *ApiController) IntrospectToken()

IntrospectToken @Title IntrospectToken @Description The introspection endpoint is an OAuth 2.0 endpoint that takes a parameter representing an OAuth 2.0 token and returns a JSON document representing the meta information surrounding the token, including whether this token is currently active. This endpoint only support Basic Authorization.

@Param token formData string true "access_token's value or refresh_token's value" @Param token_type_hint formData string true "the token type access_token or refresh_token" @Success 200 {object} object.IntrospectionResponse The Response object @Success 400 {object} object.TokenError The Response object @Success 401 {object} object.TokenError The Response object @router /login/oauth/introspect [post]

func (*ApiController) InvoicePayment added in v1.44.9

func (c *ApiController) InvoicePayment()

InvoicePayment @Title InvoicePayment @Tag Payment API @Description invoice payment @Param id query string true "The id ( owner/name ) of the payment" @Success 200 {object} controllers.Response The Response object @router /invoice-payment [post]

func (*ApiController) IsAdmin added in v1.304.0

func (c *ApiController) IsAdmin() bool

func (*ApiController) IsAdminOrSelf added in v1.366.2

func (c *ApiController) IsAdminOrSelf(user2 *object.User) bool

func (*ApiController) IsGlobalAdmin

func (c *ApiController) IsGlobalAdmin() bool

func (*ApiController) IsMaskedEnabled added in v1.318.0

func (c *ApiController) IsMaskedEnabled() (bool, bool)

IsMaskedEnabled ...

func (*ApiController) IsSessionDuplicated added in v1.239.0

func (c *ApiController) IsSessionDuplicated()

IsSessionDuplicated @Title IsSessionDuplicated @Tag Session API @Description Check if there are other different sessions for one user in one application. @Param id query string true "The id(organization/application/user) of session" @Param sessionId query string true "sessionId to be checked" @Success 200 {array} string The Response object @router /is-session-duplicated [get]

func (*ApiController) Login

func (c *ApiController) Login()

Login ... @Title Login @Tag Login API @Description login @Param clientId query string true clientId @Param responseType query string true responseType @Param redirectUri query string true redirectUri @Param scope query string false scope @Param state query string false state @Param nonce query string false nonce @Param code_challenge_method query string false code_challenge_method @Param code_challenge query string false code_challenge @Param form body controllers.AuthForm true "Login information" @Success 200 {object} controllers.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 @Param id_token_hint query string false "id_token_hint" @Param post_logout_redirect_uri query string false "post_logout_redirect_uri" @Param state query string false "state" @Success 200 {object} controllers.Response The Response object @router /logout [get,post]

func (*ApiController) MfaSetupEnable added in v1.309.0

func (c *ApiController) MfaSetupEnable()

MfaSetupEnable @Title MfaSetupEnable @Tag MFA API @Description enable totp @param owner form string true "owner of user" @param name form string true "name of user" @param type form string true "MFA auth type" @Success 200 {object} Response object @router /mfa/setup/enable [post]

func (*ApiController) MfaSetupInitiate added in v1.309.0

func (c *ApiController) MfaSetupInitiate()

MfaSetupInitiate @Title MfaSetupInitiate @Tag MFA API @Description setup MFA @param owner form string true "owner of user" @param name form string true "name of user" @param type form string true "MFA auth type" @Success 200 {object} controllers.Response The Response object @router /mfa/setup/initiate [post]

func (*ApiController) MfaSetupVerify added in v1.309.0

func (c *ApiController) MfaSetupVerify()

MfaSetupVerify @Title MfaSetupVerify @Tag MFA API @Description setup verify totp @param secret form string true "MFA secret" @param passcode form string true "MFA passcode" @Success 200 {object} Response object @router /mfa/setup/verify [post]

func (*ApiController) NotifyPayment added in v1.27.6

func (c *ApiController) NotifyPayment()

NotifyPayment @Title NotifyPayment @Tag Payment API @Description notify payment @Param body body object.Payment true "The details of the payment" @Success 200 {object} controllers.Response The Response object @router /notify-payment [post]

func (*ApiController) RefreshToken

func (c *ApiController) RefreshToken()

RefreshToken @Title RefreshToken @Tag Token API @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 false "OAuth client secret" @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 /login/oauth/refresh_token [post]

func (*ApiController) RemovePolicy added in v1.166.0

func (c *ApiController) RemovePolicy()

func (*ApiController) RemoveUserFromGroup added in v1.338.0

func (c *ApiController) RemoveUserFromGroup()

func (*ApiController) RequireAdmin added in v1.118.1

func (c *ApiController) RequireAdmin() (string, bool)

RequireAdmin ...

func (*ApiController) RequireSignedIn

func (c *ApiController) RequireSignedIn() (string, bool)

RequireSignedIn ...

func (*ApiController) RequireSignedInUser added in v1.118.1

func (c *ApiController) RequireSignedInUser() (*object.User, bool)

RequireSignedInUser ...

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) ResponseJsonData added in v1.95.0

func (c *ApiController) ResponseJsonData(resp *Response, data ...interface{})

ResponseJsonData ...

func (*ApiController) ResponseOk

func (c *ApiController) ResponseOk(data ...interface{})

ResponseOk ...

func (*ApiController) RunSyncer added in v1.44.0

func (c *ApiController) RunSyncer()

RunSyncer @Title RunSyncer @Tag Syncer API @Description run syncer @Param body body object.Syncer true "The details of the syncer" @Success 200 {object} controllers.Response The Response object @router /run-syncer [get]

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 from body controllers.EmailForm true "Details of the email request" @Success 200 {object} Response object @router /api/send-email [post]

func (*ApiController) SendNotification added in v1.394.1

func (c *ApiController) SendNotification()

SendNotification @Title SendNotification @Tag Service API @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} Response object @router /api/send-notification [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 from body controllers.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) SetPreferredMfa added in v1.309.0

func (c *ApiController) SetPreferredMfa()

SetPreferredMfa @Title SetPreferredMfa @Tag MFA API @Description: Set specific Mfa Preferred @param owner form string true "owner of user" @param name form string true "name of user" @param id form string true "id of user's MFA props" @Success 200 {object} Response object @router /set-preferred-mfa [post]

func (*ApiController) SetSessionData

func (c *ApiController) SetSessionData(s *SessionData)

SetSessionData ...

func (*ApiController) SetSessionUsername

func (c *ApiController) SetSessionUsername(user string)

SetSessionUsername ...

func (*ApiController) SetTokenErrorHttpStatus added in v1.62.5

func (c *ApiController) SetTokenErrorHttpStatus()

SetTokenErrorHttpStatus ...

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()

SyncLdapUsers @Title SyncLdapUsers @Tag Account API @Description sync ldap users @Param id query string true "id" @Success 200 {object} LdapSyncResp The Response object @router /sync-ldap-users [post]

func (*ApiController) T added in v1.141.0

func (c *ApiController) T(error string) string
func (c *ApiController) Unlink()

Unlink ... @router /unlink [post] @Tag Login API

func (*ApiController) UpdateAdapter added in v1.377.0

func (c *ApiController) UpdateAdapter()

UpdateAdapter @Title UpdateAdapter @Tag Adapter API @Description update adapter @Param id query string true "The id ( owner/name ) of the adapter" @Param body body object.Adapter true "The details of the adapter" @Success 200 {object} controllers.Response The Response object @router /update-adapter [post]

func (*ApiController) UpdateApplication

func (c *ApiController) UpdateApplication()

UpdateApplication @Title UpdateApplication @Tag Application API @Description update an application @Param id query string true "The id ( owner/name ) 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

func (c *ApiController) UpdateCert()

UpdateCert @Title UpdateCert @Tag Cert API @Description update cert @Param id query string true "The id ( owner/name ) 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) UpdateEnforcer added in v1.374.0

func (c *ApiController) UpdateEnforcer()

UpdateEnforcer @Title UpdateEnforcer @Tag Enforcer API @Description update enforcer @Param id query string true "The id ( owner/name ) of enforcer" @Param enforcer body object true "The enforcer object" @Success 200 {object} object @router /update-enforcer [post]

func (*ApiController) UpdateGroup added in v1.335.0

func (c *ApiController) UpdateGroup()

UpdateGroup @Title UpdateGroup @Tag Group API @Description update group @Param id query string true "The id ( owner/name ) of the group" @Param body body object.Group true "The details of the group" @Success 200 {object} controllers.Response The Response object @router /update-group [post]

func (*ApiController) UpdateLdap

func (c *ApiController) UpdateLdap()

UpdateLdap @Title UpdateLdap @Tag Account API @Description update ldap @Param body body object.Ldap true "The details of the ldap" @Success 200 {object} controllers.Response The Response object @router /update-ldap [post]

func (*ApiController) UpdateModel added in v1.54.0

func (c *ApiController) UpdateModel()

UpdateModel @Title UpdateModel @Tag Model API @Description update model @Param id query string true "The id ( owner/name ) of the model" @Param body body object.Model true "The details of the model" @Success 200 {object} controllers.Response The Response object @router /update-model [post]

func (*ApiController) UpdateOrganization

func (c *ApiController) UpdateOrganization()

UpdateOrganization ... @Title UpdateOrganization @Tag Organization API @Description update organization @Param id query string true "The id ( owner/name ) 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) UpdatePayment added in v1.16.0

func (c *ApiController) UpdatePayment()

UpdatePayment @Title UpdatePayment @Tag Payment API @Description update payment @Param id query string true "The id ( owner/name ) of the payment" @Param body body object.Payment true "The details of the payment" @Success 200 {object} controllers.Response The Response object @router /update-payment [post]

func (*ApiController) UpdatePermission

func (c *ApiController) UpdatePermission()

UpdatePermission @Title UpdatePermission @Tag Permission API @Description update permission @Param id query string true "The id ( owner/name ) 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) UpdatePlan added in v1.320.0

func (c *ApiController) UpdatePlan()

UpdatePlan @Title UpdatePlan @Tag Plan API @Description update plan @Param id query string true "The id ( owner/name ) of the plan" @Param body body object.Plan true "The details of the plan" @Success 200 {object} controllers.Response The Response object @router /update-plan [post]

func (*ApiController) UpdatePolicy added in v1.166.0

func (c *ApiController) UpdatePolicy()

func (*ApiController) UpdatePricing added in v1.320.0

func (c *ApiController) UpdatePricing()

UpdatePricing @Title UpdatePricing @Tag Pricing API @Description update pricing @Param id query string true "The id ( owner/name ) of the pricing" @Param body body object.Pricing true "The details of the pricing" @Success 200 {object} controllers.Response The Response object @router /update-pricing [post]

func (*ApiController) UpdateProduct added in v1.23.0

func (c *ApiController) UpdateProduct()

UpdateProduct @Title UpdateProduct @Tag Product API @Description update product @Param id query string true "The id ( owner/name ) of the product" @Param body body object.Product true "The details of the product" @Success 200 {object} controllers.Response The Response object @router /update-product [post]

func (*ApiController) UpdateProvider

func (c *ApiController) UpdateProvider()

UpdateProvider @Title UpdateProvider @Tag Provider API @Description update provider @Param id query string true "The id ( owner/name ) 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

func (c *ApiController) UpdateResource()

UpdateResource @Tag Resource API @Title UpdateResource @Description get resource @Param id query string true "The id ( owner/name ) of resource" @Param resource body object.Resource true "The resource object" @Success 200 {object} controllers.Response Success or error @router /update-resource [post]

func (*ApiController) UpdateRole

func (c *ApiController) UpdateRole()

UpdateRole @Title UpdateRole @Tag Role API @Description update role @Param id query string true "The id ( owner/name ) 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) UpdateSession added in v1.239.0

func (c *ApiController) UpdateSession()

UpdateSession @Title UpdateSession @Tag Session API @Description Update session for one user in one application. @Param id query string true "The id(organization/application/user) of session" @Success 200 {array} string The Response object @router /update-session [post]

func (*ApiController) UpdateSubscription added in v1.320.0

func (c *ApiController) UpdateSubscription()

UpdateSubscription @Title UpdateSubscription @Tag Subscription API @Description update subscription @Param id query string true "The id ( owner/name ) of the subscription" @Param body body object.Subscription true "The details of the subscription" @Success 200 {object} controllers.Response The Response object @router /update-subscription [post]

func (*ApiController) UpdateSyncer

func (c *ApiController) UpdateSyncer()

UpdateSyncer @Title UpdateSyncer @Tag Syncer API @Description update syncer @Param id query string true "The id ( owner/name ) 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 ( owner/name ) 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 ( owner/name ) 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

func (c *ApiController) UpdateWebhook()

UpdateWebhook @Title UpdateWebhook @Tag Webhook API @Description update webhook @Param id query string built-in/admin true "The id ( owner/name ) 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) UploadPermissions added in v1.325.0

func (c *ApiController) UploadPermissions()

func (*ApiController) UploadResource

func (c *ApiController) UploadResource()

UploadResource @Tag Resource API @Title UploadResource @Param owner query string true "Owner" @Param user query string true "User" @Param application query string true "Application" @Param tag query string false "Tag" @Param parent query string false "Parent" @Param fullFilePath query string true "Full File Path" @Param createdTime query string false "Created Time" @Param description query string false "Description" @Param file formData file true "Resource file" @Success 200 {object} object.Resource FileUrl, objectKey @router /upload-resource [post]

func (*ApiController) UploadRoles added in v1.325.0

func (c *ApiController) UploadRoles()

func (*ApiController) UploadUsers

func (c *ApiController) UploadUsers()

func (*ApiController) VerifyCaptcha added in v1.57.0

func (c *ApiController) VerifyCaptcha()

VerifyCaptcha ... @Title VerifyCaptcha @Tag Verification API @router /verify-captcha [post]

func (*ApiController) VerifyCode added in v1.288.0

func (c *ApiController) VerifyCode()

VerifyCode @Tag Verification API @Title VerifyCode @router /api/verify-code [post]

func (*ApiController) WebAuthnSigninBegin added in v1.68.0

func (c *ApiController) WebAuthnSigninBegin()

WebAuthnSigninBegin @Title WebAuthnSigninBegin @Tag Login API @Description WebAuthn Login Flow 1st stage @Param owner query string true "owner" @Param name query string true "name" @Success 200 {object} protocol.CredentialAssertion The CredentialAssertion object @router /webauthn/signin/begin [get]

func (*ApiController) WebAuthnSigninFinish added in v1.68.0

func (c *ApiController) WebAuthnSigninFinish()

WebAuthnSigninFinish @Title WebAuthnSigninBegin @Tag Login API @Description WebAuthn Login Flow 2nd stage @Param body body protocol.CredentialAssertionResponse true "authenticator assertion Response" @Success 200 {object} controllers.Response "The Response object" @router /webauthn/signin/finish [post]

func (*ApiController) WebAuthnSignupBegin added in v1.68.0

func (c *ApiController) WebAuthnSignupBegin()

WebAuthnSignupBegin @Title WebAuthnSignupBegin @Tag User API @Description WebAuthn Registration Flow 1st stage @Success 200 {object} protocol.CredentialCreation The CredentialCreationOptions object @router /webauthn/signup/begin [get]

func (*ApiController) WebAuthnSignupFinish added in v1.68.0

func (c *ApiController) WebAuthnSignupFinish()

WebAuthnSignupFinish @Title WebAuthnSignupFinish @Tag User API @Description WebAuthn Registration Flow 2nd stage @Param body body protocol.CredentialCreationResponse true "authenticator attestation Response" @Success 200 {object} controllers.Response "The Response object" @router /webauthn/signup/finish [post]

type Captcha added in v1.57.0

type Captcha struct {
	Type          string `json:"type"`
	AppKey        string `json:"appKey"`
	Scene         string `json:"scene"`
	CaptchaId     string `json:"captchaId"`
	CaptchaImage  []byte `json:"captchaImage"`
	ClientId      string `json:"clientId"`
	ClientSecret  string `json:"clientSecret"`
	ClientId2     string `json:"clientId2"`
	ClientSecret2 string `json:"clientSecret2"`
	SubType       string `json:"subType"`
}

type EmailForm added in v1.58.1

type EmailForm struct {
	Title     string   `json:"title"`
	Content   string   `json:"content"`
	Sender    string   `json:"sender"`
	Receivers []string `json:"receivers"`
	Provider  string   `json:"provider"`
}

type LdapResp

type LdapResp struct {
	// Groups []LdapRespGroup `json:"groups"`
	Users      []object.LdapUser `json:"users"`
	ExistUuids []string          `json:"existUuids"`
}

type LdapSyncResp

type LdapSyncResp struct {
	Exist  []object.LdapUser `json:"exist"`
	Failed []object.LdapUser `json:"failed"`
}

type LinkForm

type LinkForm struct {
	ProviderType string      `json:"providerType"`
	User         object.User `json:"user"`
}

type NotificationForm added in v1.394.1

type NotificationForm struct {
	Content string `json:"content"`
}

type Response

type Response struct {
	Status string      `json:"status"`
	Msg    string      `json:"msg"`
	Sub    string      `json:"sub"`
	Name   string      `json:"name"`
	Data   interface{} `json:"data"`
	Data2  interface{} `json:"data2"`
}

type RootController

type RootController struct {
	ApiController
}

RootController controller for handlers directly under / (root)

func (*RootController) CasP3ServiceAndProxyValidate added in v1.39.0

func (c *RootController) CasP3ServiceAndProxyValidate()

func (*RootController) CasProxy added in v1.36.0

func (c *RootController) CasProxy()

func (*RootController) CasProxyValidate added in v1.39.0

func (c *RootController) CasProxyValidate()

func (*RootController) CasServiceValidate added in v1.39.0

func (c *RootController) CasServiceValidate()

func (*RootController) CasValidate added in v1.36.0

func (c *RootController) CasValidate()

func (*RootController) GetJwks added in v1.20.1

func (c *RootController) GetJwks()

GetJwks @Title GetJwks @Tag OIDC API @Success 200 {object} jose.JSONWebKey @router /.well-known/jwks [get]

func (*RootController) GetOidcDiscovery

func (c *RootController) GetOidcDiscovery()

GetOidcDiscovery @Title GetOidcDiscovery @Tag OIDC API @Description Get Oidc Discovery @Success 200 {object} object.OidcDiscovery @router /.well-known/openid-configuration [get]

func (*RootController) SamlValidate added in v1.39.0

func (c *RootController) SamlValidate()

type SessionData

type SessionData struct {
	ExpireTime int64
}

type SmsForm added in v1.58.1

type SmsForm struct {
	Content   string   `json:"content"`
	Receivers []string `json:"receivers"`
	OrgId     string   `json:"organizationId"` // e.g. "admin/built-in"
}

type TokenRequest added in v1.35.1

type TokenRequest struct {
	GrantType    string `json:"grant_type"`
	Code         string `json:"code"`
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Verifier     string `json:"code_verifier"`
	Scope        string `json:"scope"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Tag          string `json:"tag"`
	Avatar       string `json:"avatar"`
	RefreshToken string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL