controllers

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

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 (
	MfaRecoveryCodesSession = "mfa_recovery_codes"
	MfaCountryCodeSession   = "mfa_country_code"
	MfaDestSession          = "mfa_dest"
	MfaTotpSecretSession    = "mfa_totp_secret"
)
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

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

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.Enforcer @router /add-enforcer [post]

func (*ApiController) AddGroup

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

func (c *ApiController) AddInvitation()

AddInvitation @Title AddInvitation @Tag Invitation API @Description add invitation @Param body body object.Invitation true "The details of the invitation" @Success 200 {object} controllers.Response The Response object @router /add-invitation [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

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

func (c *ApiController) AddPolicy()

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

func (c *ApiController) AddRecord()

AddRecord @Title AddRecord @Tag Record API @Description add a record @Param body body object.Record true "The details of the record" @Success 200 {object} controllers.Response The Response object @router /add-record [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

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

func (c *ApiController) AddUserKeys()

AddUserKeys @Title AddUserKeys @router /add-user-keys [post] @Tag User API @Success 200 {object} object.Userinfo The Response object

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

func (c *ApiController) BatchEnforce()

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

func (*ApiController) Callback

func (c *ApiController) Callback()

Callback @Title Callback @Tag Callback API @Description Get Login Error Counts @router /Callback [post] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) CheckUserPassword

func (c *ApiController) CheckUserPassword()

CheckUserPassword @Title CheckUserPassword @router /check-user-password [post] @Tag User API @Success 200 {object} object.Userinfo The Response object

func (*ApiController) ClearTokenSession

func (c *ApiController) ClearTokenSession()

func (*ApiController) ClearUserSession

func (c *ApiController) ClearUserSession()

func (*ApiController) DeleteAdapter

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

func (c *ApiController) DeleteEnforcer()

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

func (*ApiController) DeleteGroup

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

func (c *ApiController) DeleteInvitation()

DeleteInvitation @Title DeleteInvitation @Tag Invitation API @Description delete invitation @Param body body object.Invitation true "The details of the invitation" @Success 200 {object} controllers.Response The Response object @router /delete-invitation [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

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} controllers.Response The Response object @router /delete-mfa/ [post]

func (*ApiController) DeleteModel

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

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

func (c *ApiController) Enforce()

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

func (*ApiController) FaceIDSigninBegin

func (c *ApiController) FaceIDSigninBegin()

FaceIDSigninBegin @Title FaceIDSigninBegin @Tag Login API @Description FaceId Login Flow 1st stage @Param owner query string true "owner" @Param name query string true "name" @Success 200 {object} controllers.Response The Response object @router /faceid-signin-begin [get]

func (*ApiController) Finish

func (c *ApiController) Finish()

func (*ApiController) GetAcceptLanguage

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

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

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

func (c *ApiController) GetAllActions()

func (*ApiController) GetAllObjects

func (c *ApiController) GetAllObjects()

func (*ApiController) GetAllRoles

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} controllers.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

func (c *ApiController) GetCaptcha()

GetCaptcha ... @Tag Login API @Title GetCaptcha @router /get-captcha [get] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) GetCaptchaStatus

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 /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

func (c *ApiController) GetDashboard()

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

func (*ApiController) GetDefaultApplication

func (c *ApiController) GetDefaultApplication()

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

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.Enforcer @router /get-enforcer [get]

func (*ApiController) GetEnforcers

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

func (c *ApiController) GetGlobalCerts()

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

func (*ApiController) GetGlobalProviders

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

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

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

func (c *ApiController) GetInvitation()

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

func (*ApiController) GetInvitationCodeInfo

func (c *ApiController) GetInvitationCodeInfo()

GetInvitationCodeInfo @Title GetInvitationCodeInfo @Tag Invitation API @Description get invitation code information @Param code query string true "Invitation code" @Success 200 {object} object.Invitation The Response object @router /get-invitation-info [get]

func (*ApiController) GetInvitations

func (c *ApiController) GetInvitations()

GetInvitations @Title GetInvitations @Tag Invitation API @Description get invitations @Param owner query string true "The owner of invitations" @Success 200 {array} object.Invitation The Response object @router /get-invitations [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

func (c *ApiController) GetLdapUsers()

GetLdapUsers @Title GetLdapser @Tag Account API @Description get ldap users Param id string true "id" @Success 200 {object} controllers.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

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

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

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

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

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

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

func (c *ApiController) GetPolicies()

func (*ApiController) GetPrometheusInfo

func (c *ApiController) GetPrometheusInfo()

GetPrometheusInfo @Title GetPrometheusInfo @Tag System 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) GetQRCode

func (c *ApiController) GetQRCode()

GetQRCode @Tag System API @Title GetWechatQRCode @router /get-qrcode [GET] @Param id query string true "The id ( owner/name ) of provider" @Success 200 {object} controllers.Response The Response object

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 {object} object.Record 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 filter body string true "filter Record message" @Success 200 {object} object.Record The Response object @router /get-records-filter [post]

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

func (c *ApiController) GetSamlMeta()

func (*ApiController) GetSessionApplication

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

func (*ApiController) GetSessionData

func (c *ApiController) GetSessionData() *SessionData

GetSessionData ...

func (*ApiController) GetSessionOidc

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

func (*ApiController) GetSessionToken

func (c *ApiController) GetSessionToken() string

func (*ApiController) GetSessionUsername

func (c *ApiController) GetSessionUsername() string

GetSessionUsername ...

func (*ApiController) GetSessions

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

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

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

func (c *ApiController) GetUserVerifications()

GetUserVerifications @Title GetUserVerifications @Tag Verification 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.Verification The Response object @router /get-user-payments [get]

func (*ApiController) GetUserinfo

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

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} controllers.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) GetVerification

func (c *ApiController) GetVerification()

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

func (*ApiController) GetVerifications

func (c *ApiController) GetVerifications()

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

func (*ApiController) GetVersionInfo

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

func (c *ApiController) GetWebhookEventType()

GetWebhookEventType ... @Tag System API @Title GetWebhookEventType @router /get-webhook-event [GET] @Param ticket query string true "The eventId of QRCode" @Success 200 {object} controllers.Response The Response object

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

func (c *ApiController) HandleOfficialAccountEvent()

HandleOfficialAccountEvent ... @Tag System API @Title HandleOfficialAccountEvent @router /webhook [POST] @Success 200 {object} controllers.Response The Response object

func (*ApiController) HandleSamlLogin

func (c *ApiController) HandleSamlLogin()

func (*ApiController) HandleSamlRedirect

func (c *ApiController) HandleSamlRedirect()

func (*ApiController) Health

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

func (c *ApiController) IntrospectToken()

IntrospectToken @Title IntrospectToken @Tag Login API @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) IsAdmin

func (c *ApiController) IsAdmin() bool

func (*ApiController) IsAdminOrSelf

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

func (*ApiController) IsGlobalAdmin

func (c *ApiController) IsGlobalAdmin() bool

func (*ApiController) IsMaskedEnabled

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

IsMaskedEnabled ...

func (*ApiController) IsOrgAdmin

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

func (*ApiController) IsSessionDuplicated

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 [post]

func (*ApiController) MfaSetupEnable

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} controllers.Response The Response object @router /mfa/setup/enable [post]

func (*ApiController) MfaSetupInitiate

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

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} controllers.Response The Response object @router /mfa/setup/verify [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

func (c *ApiController) RemovePolicy()

func (*ApiController) RemoveUserFromGroup

func (c *ApiController) RemoveUserFromGroup()

func (*ApiController) RequireAdmin

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

RequireAdmin ...

func (*ApiController) RequireSignedIn

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

RequireSignedIn ...

func (*ApiController) RequireSignedInUser

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

RequireSignedInUser ...

func (*ApiController) ResetEmailOrPhone

func (c *ApiController) ResetEmailOrPhone()

ResetEmailOrPhone ... @Tag Account API @Title ResetEmailOrPhone @router /reset-email-or-phone [post] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) ResponseError

func (c *ApiController) ResponseError(error string, data ...interface{})

ResponseError ...

func (*ApiController) ResponseJsonData

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

ResponseJsonData ...

func (*ApiController) ResponseOk

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

ResponseOk ...

func (*ApiController) ResponseTokenError

func (c *ApiController) ResponseTokenError(errorMsg string)

func (*ApiController) RunSyncer

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} controllers.Response The Response object @router /send-email [post]

func (*ApiController) SendNotification

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} controllers.Response The Response object @router /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} controllers.Response The Response object @router /send-sms [post]

func (*ApiController) SendVerificationCode

func (c *ApiController) SendVerificationCode()

SendVerificationCode ... @Title SendVerificationCode @Tag Verification API @router /send-verification-code [post] @Success 200 {object} object.Userinfo The Response object

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

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} controllers.Response The Response object @router /set-preferred-mfa [post]

func (*ApiController) SetSessionData

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

SetSessionData ...

func (*ApiController) SetSessionToken

func (c *ApiController) SetSessionToken(accessToken string)

func (*ApiController) SetSessionUsername

func (c *ApiController) SetSessionUsername(user string)

SetSessionUsername ...

func (*ApiController) SetTokenErrorHttpStatus

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} controllers.LdapSyncResp The Response object @router /sync-ldap-users [post]

func (*ApiController) T

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

func (*ApiController) TestSyncerDb

func (c *ApiController) TestSyncerDb()
func (c *ApiController) Unlink()

Unlink ... @Tag Login API @Title Unlink @router /unlink [post] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) UpdateAdapter

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

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.Enforcer @router /update-enforcer [post]

func (*ApiController) UpdateGroup

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

func (c *ApiController) UpdateInvitation()

UpdateInvitation @Title UpdateInvitation @Tag Invitation API @Description update invitation @Param id query string true "The id ( owner/name ) of the invitation" @Param body body object.Invitation true "The details of the invitation" @Success 200 {object} controllers.Response The Response object @router /update-invitation [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

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

func (c *ApiController) UpdatePolicy()

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

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

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

func (c *ApiController) UploadRoles()

func (*ApiController) UploadUsers

func (c *ApiController) UploadUsers()

func (*ApiController) VerifyCaptcha

func (c *ApiController) VerifyCaptcha()

VerifyCaptcha ... @Title VerifyCaptcha @Tag Verification API @router /verify-captcha [post] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) VerifyCode

func (c *ApiController) VerifyCode()

VerifyCode @Tag Verification API @Title VerifyCode @router /verify-code [post] @Success 200 {object} object.Userinfo The Response object

func (*ApiController) VerifyInvitation

func (c *ApiController) VerifyInvitation()

VerifyInvitation @Title VerifyInvitation @Tag Invitation API @Description verify invitation @Param id query string true "The id ( owner/name ) of the invitation" @Success 200 {object} controllers.Response The Response object @router /verify-invitation [get]

func (*ApiController) WebAuthnSigninBegin

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

func (c *ApiController) WebAuthnSigninFinish()

WebAuthnSigninFinish @Title WebAuthnSigninFinish @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

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

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

type Captcha struct {
	Owner         string `json:"owner"`
	Name          string `json:"name"`
	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

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

type LaravelResponse

type LaravelResponse struct {
	Id              string `json:"id"`
	Name            string `json:"name"`
	Email           string `json:"email"`
	EmailVerifiedAt string `json:"email_verified_at"`
	CreatedAt       string `json:"created_at"`
	UpdatedAt       string `json:"updated_at"`
}

this API is used by "Api URL" of Flarum's FoF Passport plugin https://github.com/FriendsOfFlarum/passport

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

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

func (c *RootController) CasP3ProxyValidate()

func (*RootController) CasP3ServiceValidate

func (c *RootController) CasP3ServiceValidate()

func (*RootController) CasProxy

func (c *RootController) CasProxy()

func (*RootController) CasProxyValidate

func (c *RootController) CasProxyValidate()

func (*RootController) CasServiceValidate

func (c *RootController) CasServiceValidate()

func (*RootController) CasValidate

func (c *RootController) CasValidate()

func (*RootController) GetJwks

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

func (c *RootController) HandleScim()

func (*RootController) SamlValidate

func (c *RootController) SamlValidate()

type SessionData

type SessionData struct {
	ExpireTime int64
}

type SmsForm

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

type TokenRequest

type TokenRequest struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	GrantType    string `json:"grant_type"`
	Code         string `json:"code"`
	Verifier     string `json:"code_verifier"`
	Scope        string `json:"scope"`
	Nonce        string `json:"nonce"`
	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