Versions in this module Expand all Collapse all v1 v1.0.10 Oct 24, 2024 v1.0.9 Oct 24, 2024 v1.0.8 Oct 24, 2024 v1.0.7 Oct 24, 2024 v1.0.6 Oct 15, 2024 Changes in this version type Organization + PasswordObfuscatorKey string + PasswordObfuscatorType string v1.0.3 Sep 26, 2024 v1.0.2 Sep 26, 2024 v1.0.1 Sep 26, 2024 Changes in this version + const DefaultFailedSigninFrozenTime + const DefaultFailedSigninLimit + const EmailType + const EndpointError + const InvalidClient + const InvalidGrant + const InvalidRequest + const InvalidScope + const MfaSessionUserId + const MfaTotpPeriodInSeconds + const NextMfa + const PeriodMonthly + const PeriodYearly + const ProviderTypeAzureBlob + const ProviderTypeGoogleCloudStorage + const ProviderTypeLocalFileSystem + const ProviderTypeTencentCloudCOS + const RequiredMfa + const SmsType + const TotpType + const UnauthorizedClient + const UnsupportedGrantType + const UserEnforcerId + const UserPropertiesWechatOpenId + const UserPropertiesWechatUnionId + const VerificationSuccess + const VerifyTypeEmail + const VerifyTypePhone + var ApiLatency = promauto.NewHistogramVec(prometheus.HistogramOpts{ ... }, []string{ ... }) + var ApiThroughput = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var CasdoorApplication = "app-built-in" + var CasdoorOrganization = "built-in" + var CpuUsage = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var MemoryUsage = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var TotalThroughput = promauto.NewGauge(prometheus.GaugeOpts{ ... }) + func AddAdapter(adapter *Adapter) (bool, error) + func AddApplication(application *Application) (bool, error) + func AddCert(cert *Cert) (bool, error) + func AddEnforcer(enforcer *Enforcer) (bool, error) + func AddGroup(group *Group) (bool, error) + func AddGroups(groups []*Group) (bool, error) + func AddInvitation(invitation *Invitation, lang string) (bool, error) + func AddLdap(ldap *Ldap) (bool, error) + func AddModel(model *Model) (bool, error) + func AddOrUpdateResource(resource *Resource) (bool, error) + func AddOrganization(organization *Organization) (bool, error) + func AddPayment(payment *Payment) (bool, error) + func AddPermission(permission *Permission) (bool, error) + func AddPermissions(permissions []*Permission) (bool, error) + func AddPermissionsInBatch(permissions []*Permission) (bool, error) + func AddPlan(plan *Plan) (bool, error) + func AddPolicy(id string, ptype string, policy []string) (bool, error) + func AddPricing(pricing *Pricing) (bool, error) + func AddProduct(product *Product) (bool, error) + func AddProvider(provider *Provider) (bool, error) + func AddRadiusAccounting(ra *RadiusAccounting) error + func AddRecord(record *casvisorsdk.Record) bool + func AddResource(resource *Resource) (bool, error) + func AddRole(role *Role) (bool, error) + func AddRoles(roles []*Role) bool + func AddRolesInBatch(roles []*Role) bool + func AddSession(session *Session) (bool, error) + func AddSubscription(subscription *Subscription) (bool, error) + func AddSyncer(syncer *Syncer) (bool, error) + func AddToVerificationRecord(user *User, provider *Provider, remoteAddr, recordType, dest, code string) error + func AddToken(token *Token) (bool, error) + func AddTransaction(transaction *Transaction) (bool, error) + func AddUser(user *User) (bool, error) + func AddUserKeys(user *User, isAdmin bool) (bool, error) + func AddUserToOriginalDatabase(user *User) error + func AddUsers(users []*User) (bool, error) + func AddUsersInBatch(users []*User) (bool, error) + func AddWebhook(webhook *Webhook) (bool, error) + func BatchEnforce(permission *Permission, requests [][]string, permissionIds ...string) ([]bool, error) + func CheckAccountItemModifyRule(accountItem *AccountItem, isAdmin bool, lang string) (bool, string) + func CheckCasLogin(application *Application, lang string, service string) error + func CheckFaceId(user *User, faceId []float64, lang string) error + func CheckInvitationDefaultCode(code string, defaultCode string, lang string) error + func CheckLdapExist(ldap *Ldap) (bool, error) + func CheckLoginPermission(userId string, application *Application) (bool, error) + func CheckPassword(user *User, password string, lang string, options ...bool) error + func CheckPasswordComplexity(user *User, password string) string + func CheckPasswordComplexityByOrg(organization *Organization, password string) string + func CheckPermissionForUpdateUser(oldUser, newUser *User, isAdmin bool, lang string) (bool, string) + func CheckPricingAndPlan(owner, pricingName, planName string) error + func CheckSigninCode(user *User, dest, code, lang string) error + func CheckToEnableCaptcha(application *Application, organization, username string) (bool, error) + func CheckUpdateUser(oldUser, user *User, lang string) string + func CheckUserPermission(requestUserId, userId string, strict bool, lang string) (bool, error) + func CheckUserSignup(application *Application, organization *Organization, authForm *form.AuthForm, ...) string + func CheckUsername(username string, lang string) string + func ClearThroughputPerSecond() + func ClearUserOAuthProperties(user *User, providerType string) (bool, error) + func CopyRecord(record *casvisorsdk.Record) *casvisorsdk.Record + func CreateTables() + func DailSmtpServer(provider *Provider) error + func DeleteAdapter(adapter *Adapter) (bool, error) + func DeleteApplication(application *Application) (bool, error) + func DeleteBeegoSession(sessionIds []string) + func DeleteCert(cert *Cert) (bool, error) + func DeleteEnforcer(enforcer *Enforcer) (bool, error) + func DeleteFile(provider *Provider, objectKey string, lang string) error + func DeleteGroup(group *Group) (bool, error) + func DeleteGroupForUser(user string, group string) (bool, error) + func DeleteInvitation(invitation *Invitation) (bool, error) + func DeleteLdap(ldap *Ldap) (bool, error) + func DeleteModel(model *Model) (bool, error) + func DeleteOrganization(organization *Organization) (bool, error) + func DeletePayment(payment *Payment) (bool, error) + func DeletePermission(permission *Permission) (bool, error) + func DeletePlan(plan *Plan) (bool, error) + func DeletePricing(pricing *Pricing) (bool, error) + func DeleteProduct(product *Product) (bool, error) + func DeleteProvider(provider *Provider) (bool, error) + func DeleteRadiusAccounting(ra *RadiusAccounting) error + func DeleteResource(resource *Resource) (bool, error) + func DeleteRole(role *Role) (bool, error) + func DeleteSession(id string) (bool, error) + func DeleteSessionId(id string, sessionId string) (bool, error) + func DeleteSubscription(subscription *Subscription) (bool, error) + func DeleteSyncer(syncer *Syncer) (bool, error) + func DeleteToken(token *Token) (bool, error) + func DeleteTransaction(transaction *Transaction) (bool, error) + func DeleteUser(user *User) (bool, error) + func DeleteWebhook(webhook *Webhook) (bool, error) + func DialWithCert(SshUser string, CertId string, SshHost string, SshPort int) (*ssh.Client, error) + func DialWithPassword(SshUser string, SshPassword string, SshHost string, SshPort int) (*ssh.Client, error) + func DialWithPrivateKey(SshUser string, PrivateKey []byte, SshHost string, SshPort int) (*ssh.Client, error) + func DisableVerificationCode(dest string) error + func DisabledMultiFactorAuth(user *User) error + func DownloadAndUpload(url string, fullFilePath string, lang string) (err error) + func DumpToFile(filePath string) error + func Enforce(permission *Permission, request []string, permissionIds ...string) (bool, error) + func ExpireTokenByAccessToken(accessToken string) (bool, *Application, *Token, error) + func ExtendGroupWithUsers(group *Group) error + func ExtendGroupsWithUsers(groups []*Group) error + func ExtendProductWithProviders(product *Product) error + func ExtendUserWithRolesAndPermissions(user *User) (err error) + func FromProviderToIdpInfo(ctx *context.Context, provider *Provider) *idp.ProviderInfo + func GenerateCasToken(userId string, service string) (string, error) + func GenerateId() + func GenerateIdForNewUser(application *Application) (string, error) + func GenerateSamlRequest(id, relayState, host, lang string) (auth string, method string, err error) + func GetAccessTokenByUser(user *User, host string) (string, error) + func GetAdapterCount(owner, field, value string) (int64, error) + func GetAllActions(userId string) ([]string, error) + func GetAllObjects(userId string) ([]string, error) + func GetAllRoles(userId string) ([]string, error) + func GetApplicationCount(owner, field, value string) (int64, error) + func GetAuthorizationCodeToken(application *Application, clientSecret string, code string, verifier string) (*Token, *TokenError, error) + func GetBuiltInModel(modelText string) (model.Model, error) + func GetCaptcha() (string, []byte, error) + func GetCertCount(owner, field, value string) (int64, error) + func GetClientCredentialsToken(application *Application, clientSecret string, scope string, host string) (*Token, *TokenError, error) + func GetDuration(period string) (startTime time.Time, endTime time.Time) + func GetEnforcerCount(owner, field, value string) (int64, error) + func GetExistUuids(owner string, uuids []string) ([]string, error) + func GetFailedSigninConfigByUser(user *User) (int, int, error) + func GetFaviconUrl(htmlStr string) (string, error) + func GetGlobalCertsCount(field, value string) (int64, error) + func GetGlobalProviderCount(field, value string) (int64, error) + func GetGlobalUserCount(field, value string) (int64, error) + func GetGroupCount(owner, field, value string) (int64, error) + func GetGroupUserCount(groupId string, field, value string) (int64, error) + func GetGroupWithPrefix(group string) string + func GetGroupWithoutPrefix(group string) string + func GetImplicitToken(application *Application, username string, scope string, nonce string, ...) (*Token, *TokenError, error) + func GetInvitationCount(owner, field, value string) (int64, error) + func GetJsonWebKeySet() (jose.JSONWebKeySet, error) + func GetModelCount(owner, field, value string) (int64, error) + func GetOAuthToken(grantType string, clientId string, clientSecret string, code string, ...) (interface{}, error) + func GetOnlineUserCount(owner string, isOnline int) (int64, error) + func GetOrganizationApplicationCount(owner, organization, field, value string) (int64, error) + func GetOrganizationCount(owner, name, field, value string) (int64, error) + func GetPaginationRecords(offset, limit int, field, value, sortField, sortOrder string, ...) ([]*casvisorsdk.Record, error) + func GetPasswordToken(application *Application, username string, password string, scope string, ...) (*Token, *TokenError, error) + func GetPaymentCount(owner, field, value string) (int64, error) + func GetPaymentProvider(p *Provider) (pp.PaymentProvider, error) + func GetPermissionCount(owner, field, value string) (int64, error) + func GetPlanCount(owner, field, value string) (int64, error) + func GetPolicies(id string) ([]*xormadapter.CasbinRule, error) + func GetPricingCount(owner, field, value string) (int64, error) + func GetProductCount(owner, field, value string) (int64, error) + func GetProviderCount(owner, field, value string) (int64, error) + func GetRecordCount(field, value string, filterRecord *casvisorsdk.Record) (int64, error) + func GetRecords() ([]*casvisorsdk.Record, error) + func GetRecordsByField(record *casvisorsdk.Record) ([]*casvisorsdk.Record, error) + func GetResourceCount(owner, user, field, value string) (int64, error) + func GetRoleCount(owner, field, value string) (int64, error) + func GetSamlRedirectAddress(owner string, application string, relayState string, samlRequest string, ...) string + func GetSamlResponse(application *Application, user *User, samlRequest string, host string) (string, string, string, error) + func GetSession(owner string, offset, limit int, field, value, sortField, sortOrder string) *xorm.Session + func GetSessionCount(owner, field, value string) (int64, error) + func GetSessionForUser(owner string, offset, limit int, field, value, sortField, sortOrder string) *xorm.Session + func GetSubscriptionCount(owner, field, value string) (int64, error) + func GetSyncerCount(owner, organization, field, value string) (int64, error) + func GetTokenCount(owner, organization, field, value string) (int64, error) + func GetTransactionCount(owner, field, value string) (int64, error) + func GetTruncatedPath(provider *Provider, fullFilePath string, limit int) string + func GetUploadFileUrl(provider *Provider, fullFilePath string, hasTimestamp bool) (string, string) + func GetUserCount(owner, field, value string, groupName string) (int64, error) + func GetUserField(user *User, field string) string + func GetUserFieldStringValue(user *User, fieldName string) (bool, string, error) + func GetValidationBySaml(samlRequest string, host string) (string, string, error) + func GetVerificationCount(owner, field, value string) (int64, error) + func GetVerifyType(username string) (verificationCodeType string) + func GetWebAuthnObject(host string) (*webauthn.WebAuthn, error) + func GetWebhookCount(owner, organization, field, value string) (int64, error) + func GetWechatMiniProgramToken(application *Application, code string, host string, username string, ...) (*Token, *TokenError, error) + func GroupChangeTrigger(oldName, newName string) error + func GroupPermissionsByModelAdapter(permissions []*Permission) map[string][]string + func HasRoleDefinition(m model.Model) bool + func HasUserByField(organizationName string, field string, value string) bool + func InitAdapter() + func InitCasvisorConfig() + func InitConfig() + func InitDb() + func InitDefaultStorageProvider() + func InitFlag() + func InitFromFile() + func InitLdapAutoSynchronizer() + func InitUserManager() + func InterimUpdateRadiusAccounting(oldRa *RadiusAccounting, newRa *RadiusAccounting, stop bool) error + func InvoicePayment(payment *Payment) (string, error) + func IsAllowSend(user *User, remoteAddr, recordType string) error + func IsAppUser(userId string) bool + func IsGrantTypeValid(method string, grantTypes []string) bool + func IsNeedPromptMfa(org *Organization, user *User) bool + func IsOriginAllowed(origin string) (bool, error) + func IsSessionDuplicated(id string, sessionId string) (bool, error) + func LinkUserAccount(user *User, field string, value string) (bool, error) + func MfaRecover(user *User, recoveryCode string) error + func NewRecord(ctx *context.Context) (*casvisorsdk.Record, error) + func NewSamlResponse(application *Application, user *User, host string, certificate string, ...) (*etree.Element, error) + func NewSamlResponse11(application *Application, user *User, requestID string, host string) (*etree.Element, error) + func ParseSamlResponse(samlResponse string, provider *Provider, host string) (*idp.UserInfo, error) + func RefreshToken(grantType string, refreshToken string, scope string, clientId string, ...) (interface{}, error) + func RemovePolicy(id string, ptype string, policy []string) (bool, error) + func RunSyncUsersJob() + func RunSyncer(syncer *Syncer) error + func SendEmail(provider *Provider, title string, content string, dest string, sender string) error + func SendNotification(provider *Provider, content string) error + func SendSms(provider *Provider, content string, phoneNumbers ...string) error + func SendVerificationCodeToEmail(organization *Organization, user *User, provider *Provider, remoteAddr string, ...) error + func SendVerificationCodeToPhone(organization *Organization, user *User, provider *Provider, remoteAddr string, ...) error + func SendWebhooks(record *casvisorsdk.Record) error + func SetPreferredMultiFactorAuth(user *User, mfaType string) error + func SetUserField(user *User, field string, value string) (bool, error) + func SetUserOAuthProperties(organization *Organization, user *User, providerType string, ...) (bool, error) + func StoreCasTokenForPgt(token *CasAuthenticationSuccess, service, userId string) string + func StoreCasTokenForProxyTicket(token *CasAuthenticationSuccess, targetService, userId string) string + func SyncLdapUsers(owner string, syncUsers []LdapUser, ldapId string) (existUsers []LdapUser, failedUsers []LdapUser, err error) + func TestSyncerDb(syncer Syncer) error + func UpdateAdapter(id string, adapter *Adapter) (bool, error) + func UpdateApplication(id string, application *Application) (bool, error) + func UpdateCert(id string, cert *Cert) (bool, error) + func UpdateEnforcer(id string, enforcer *Enforcer) (bool, error) + func UpdateGroup(id string, group *Group) (bool, error) + func UpdateInvitation(id string, invitation *Invitation, lang string) (bool, error) + func UpdateLdap(ldap *Ldap) (bool, error) + func UpdateLdapSyncTime(ldapId string) error + func UpdateModel(id string, modelObj *Model) (bool, error) + func UpdateModelWithCheck(id string, modelObj *Model) error + func UpdateOrganization(id string, organization *Organization) (bool, error) + func UpdatePayment(id string, payment *Payment) (bool, error) + func UpdatePermission(id string, permission *Permission) (bool, error) + func UpdatePlan(id string, plan *Plan) (bool, error) + func UpdatePolicy(id string, ptype string, oldPolicy []string, newPolicy []string) (bool, error) + func UpdatePricing(id string, pricing *Pricing) (bool, error) + func UpdateProduct(id string, product *Product) (bool, error) + func UpdateProductForPlan(plan *Plan, product *Product) + func UpdateProvider(id string, provider *Provider) (bool, error) + func UpdateRadiusAccounting(id string, ra *RadiusAccounting) error + func UpdateResource(id string, resource *Resource) (bool, error) + func UpdateRole(id string, role *Role) (bool, error) + func UpdateSession(id string, session *Session) (bool, error) + func UpdateSubscription(id string, subscription *Subscription) (bool, error) + func UpdateSyncer(id string, syncer *Syncer) (bool, error) + func UpdateToken(id string, token *Token) (bool, error) + func UpdateTransaction(id string, transaction *Transaction) (bool, error) + func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, error) + func UpdateUserBalance(owner string, name string, balance float64) error + func UpdateUserForAllFields(id string, user *User) (bool, error) + func UpdateUserToOriginalDatabase(user *User) error + func UpdateWebhook(id string, webhook *Webhook) (bool, error) + func UploadFileSafe(provider *Provider, fullFilePath string, fileBuffer *bytes.Buffer, lang string) (string, string, error) + func UploadPermissions(owner string, path string) (bool, error) + func UploadRoles(owner string, path string) (bool, error) + func UploadUsers(owner string, path string) (bool, error) + func VerifyCaptcha(id string, digits string) bool + type AccountItem struct + ModifyRule string + Name string + Regex string + ViewRule string + Visible bool + func GetAccountItemByName(name string, organization *Organization) *AccountItem + type Adapter struct + CreatedTime string + Database string + DatabaseType string + Host string + Name string + Owner string + Password string + Port int + Table string + Type string + UseSameDb bool + User string + func GetAdapter(id string) (*Adapter, error) + func GetAdapters(owner string) ([]*Adapter, error) + func GetPaginationAdapters(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Adapter, error) + func (adapter *Adapter) GetId() string + func (adapter *Adapter) InitAdapter() error + type Affiliation struct + Id int + Name string + type Application struct + AffiliationUrl string + Cert string + CertPublicKey string + ClientId string + ClientSecret string + CreatedTime string + Description string + DisplayName string + EnableAutoSignin bool + EnableCodeSignin bool + EnableLinkWithEmail bool + EnablePassword bool + EnableSamlC14n10 bool + EnableSamlCompress bool + EnableSamlPostBinding bool + EnableSignUp bool + EnableSigninSession bool + EnableWebAuthn bool + ExpireInHours int + FailedSigninFrozenTime int + FailedSigninLimit int + FooterHtml string + ForgetUrl string + FormBackgroundUrl string + FormCss string + FormCssMobile string + FormOffset int + FormSideHtml string + GrantTypes []string + HeaderHtml string + HomepageUrl string + IsShared bool + Logo string + Name string + OrgChoiceMode string + Organization string + OrganizationObj *Organization + Owner string + Providers []*ProviderItem + RedirectUris []string + RefreshExpireInHours int + SamlAttributes []*SamlItem + SamlReplyUrl string + SigninHtml string + SigninItems []*SigninItem + SigninMethods []*SigninMethod + SigninUrl string + SignupHtml string + SignupItems []*SignupItem + SignupUrl string + Tags []string + TermsOfUse string + ThemeData *ThemeData + TokenFields []string + TokenFormat string + TokenSigningMethod string + UseEmailAsSamlNameId bool + func CheckOAuthLogin(clientId string, responseType string, redirectUri string, scope string, ...) (string, *Application, error) + func GetAllowedApplications(applications []*Application, userId string, lang string) ([]*Application, error) + func GetApplication(id string) (*Application, error) + func GetApplicationByClientId(clientId string) (*Application, error) + func GetApplicationByOrganizationName(organization string) (*Application, error) + func GetApplicationByUser(user *User) (*Application, error) + func GetApplicationByUserId(userId string) (application *Application, err error) + func GetApplications(owner string) ([]*Application, error) + func GetDefaultApplication(id string) (*Application, error) + func GetMaskedApplication(application *Application, userId string) *Application + func GetMaskedApplications(applications []*Application, userId string) []*Application + func GetOrganizationApplications(owner string, organization string) ([]*Application, error) + func GetPaginationApplications(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Application, error) + func GetPaginationOrganizationApplications(owner, organization string, offset, limit int, ...) ([]*Application, error) + func (application *Application) GetEmailProvider(method string) (*Provider, error) + func (application *Application) GetId() string + func (application *Application) GetProviderByCategory(category string) (*Provider, error) + func (application *Application) GetProviderByCategoryAndRule(category string, method string, countryCode string) (*Provider, error) + func (application *Application) GetProviderItem(providerName string) *ProviderItem + func (application *Application) GetProviderItemByType(providerType string) *ProviderItem + func (application *Application) GetSignupItemRule(itemName string) string + func (application *Application) GetSmsProvider(method string, countryCode string) (*Provider, error) + func (application *Application) GetStorageProvider() (*Provider, error) + func (application *Application) HasPromptPage() bool + func (application *Application) IsCodeSigninViaEmailEnabled() bool + func (application *Application) IsCodeSigninViaSmsEnabled() bool + func (application *Application) IsFaceIdEnabled() bool + func (application *Application) IsLdapEnabled() bool + func (application *Application) IsPasswordEnabled() bool + func (application *Application) IsPasswordWithLdapEnabled() bool + func (application *Application) IsRedirectUriValid(redirectUri string) bool + func (application *Application) IsSignupItemRequired(itemName string) bool + func (application *Application) IsSignupItemVisible(itemName string) bool + type Attribute struct + FriendlyName string + Name string + NameFormat string + Values []string + Xmlns string + type CasAnyAttribute struct + Value string + XMLName xml.Name + type CasAttributes struct + AuthenticationDate time.Time + ExtraAttributes []*CasAnyAttribute + IsFromNewLogin bool + LongTermAuthenticationRequestTokenUsed bool + MemberOf []string + UserAttributes *CasUserAttributes + XMLName xml.Name + func (c *CasAttributes) DeepCopy() CasAttributes + type CasAuthenticationFailure struct + Code string + Message string + XMLName xml.Name + type CasAuthenticationSuccess struct + Attributes *CasAttributes + ExtraAttributes []*CasAnyAttribute + Proxies *CasProxies + ProxyGrantingTicket string + User string + XMLName xml.Name + func GetCasTokenByPgt(pgt string) (bool, *CasAuthenticationSuccess, string, string) + func GetCasTokenByTicket(ticket string) (bool, *CasAuthenticationSuccess, string, string) + func (c *CasAuthenticationSuccess) DeepCopy() CasAuthenticationSuccess + type CasAuthenticationSuccessWrapper struct + AuthenticationSuccess *CasAuthenticationSuccess + Service string + UserId string + type CasNamedAttribute struct + Name string + Value string + XMLName xml.Name + type CasProxies struct + Proxies []string + XMLName xml.Name + func (c *CasProxies) DeepCopy() CasProxies + type CasProxyFailure struct + Code string + Message string + XMLName xml.Name + type CasProxySuccess struct + ProxyTicket string + XMLName xml.Name + type CasServiceResponse struct + Failure *CasAuthenticationFailure + ProxyFailure *CasProxyFailure + ProxySuccess *CasProxySuccess + Success *CasAuthenticationSuccess + XMLName xml.Name + Xmlns string + type CasUserAttributes struct + AnyAttributes []*CasAnyAttribute + Attributes []*CasNamedAttribute + XMLName xml.Name + func (c *CasUserAttributes) DeepCopy() CasUserAttributes + type Cert struct + BitSize int + Certificate string + CreatedTime string + CryptoAlgorithm string + DisplayName string + ExpireInYears int + Name string + Owner string + PrivateKey string + Scope string + Type string + func GetCert(id string) (*Cert, error) + func GetCerts(owner string) ([]*Cert, error) + func GetDefaultCert() (*Cert, error) + func GetGlobalCerts() ([]*Cert, error) + func GetMaskedCert(cert *Cert) *Cert + func GetMaskedCerts(certs []*Cert, err error) ([]*Cert, error) + func GetPaginationCerts(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Cert, error) + func GetPaginationGlobalCerts(offset, limit int, field, value, sortField, sortOrder string) ([]*Cert, error) + func (p *Cert) GetId() string + type Claims struct + Nonce string + Scope string + Tag string + TokenType string + func ParseJwtToken(token string, cert *Cert) (*Claims, error) + func ParseJwtTokenByApplication(token string, application *Application) (*Claims, error) + type ClaimsShort struct + Nonce string + Scope string + TokenType string + type ClaimsStandard struct + Address OIDCAddress + EmailVerified bool + Gender string + Nonce string + PhoneNumber string + PhoneNumberVerified bool + Scope string + TokenType string + func ParseStandardJwtToken(token string, cert *Cert) (*ClaimsStandard, error) + func ParseStandardJwtTokenByApplication(token string, application *Application) (*ClaimsStandard, error) + type ClaimsWithoutThirdIdp struct + Nonce string + Scope string + Tag string + TokenType string + type Code struct + Code string + Message string + func GetOAuthCode(userId string, clientId string, responseType string, redirectUri string, ...) (*Code, error) + type Credential struct + Salt string + Value string + type Dashboard struct + ApplicationCounts []int + OrganizationCounts []int + ProviderCounts []int + SubscriptionCounts []int + UserCounts []int + func GetDashboard(owner string) (*Dashboard, error) + type Enforcer struct + Adapter string + CreatedTime string + Description string + DisplayName string + Model string + ModelCfg map[string]string + Name string + Owner string + UpdatedTime string + func GetEnforcer(id string) (*Enforcer, error) + func GetEnforcers(owner string) ([]*Enforcer, error) + func GetInitializedEnforcer(enforcerId string) (*Enforcer, error) + func GetPaginationEnforcers(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Enforcer, error) + func (enforcer *Enforcer) GetId() string + func (enforcer *Enforcer) GetModelAndAdapter() string + func (enforcer *Enforcer) InitEnforcer() error + func (enforcer *Enforcer) LoadModelCfg() error + type FaceId struct + FaceIdData []float64 + Name string + type GaugeVecInfo struct + Method string + Name string + Throughput float64 + type Group struct + Children []*Group + ContactEmail string + CreatedTime string + DisplayName string + IsEnabled bool + IsTopGroup bool + Key string + Manager string + Name string + Owner string + ParentId string + Title string + Type string + UpdatedTime string + Users []string + func ConvertToTreeData(groups []*Group, parentId string) []*Group + func GetGroup(id string) (*Group, error) + func GetGroups(owner string) ([]*Group, error) + func GetPaginationGroups(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Group, error) + func (group *Group) GetId() string + type GroupNode struct + type Header struct + Name string + Value string + type HistogramVecInfo struct + Count uint64 + Latency string + Method string + Name string + type HttpSmsClient struct + func (c *HttpSmsClient) SendMessage(param map[string]string, targetPhoneNumber ...string) error + type IdpEntityDescriptor struct + DS string + EntityId string + IdpSSODescriptor IdpSSODescriptor + MD string + XMLNS string + XMLName xml.Name + func GetSamlMeta(application *Application, host string, enablePostBinding bool) (*IdpEntityDescriptor, error) + type IdpSSODescriptor struct + Attribute []Attribute + NameIDFormats []NameIDFormat + ProtocolSupportEnumeration string + SigningKeyDescriptor KeyDescriptor + SingleSignOnService SingleSignOnService + XMLName xml.Name + type InitData struct + Adapters []*Adapter + Applications []*Application + Certs []*Cert + Enforcers []*Enforcer + Groups []*Group + Invitations []*Invitation + Ldaps []*Ldap + Models []*Model + Organizations []*Organization + Payments []*Payment + Permissions []*Permission + Plans []*Plan + Pricings []*Pricing + Products []*Product + Providers []*Provider + Records []*casvisorsdk.Record + Resources []*Resource + Roles []*Role + Sessions []*Session + Subscriptions []*Subscription + Syncers []*Syncer + Tokens []*Token + Transactions []*Transaction + Users []*User + Webhooks []*Webhook + type IntrospectionResponse struct + Active bool + Aud []string + ClientId string + Exp int64 + Iat int64 + Iss string + Jti string + Nbf int64 + Scope string + Sub string + TokenType string + Username string + type Invitation struct + Application string + Code string + CreatedTime string + DefaultCode string + DisplayName string + Email string + IsRegexp bool + Name string + Owner string + Phone string + Quota int + SignupGroup string + State string + UpdatedTime string + UsedCount int + Username string + func CheckInvitationCode(application *Application, organization *Organization, authForm *form.AuthForm, ...) (*Invitation, string) + func GetInvitation(id string) (*Invitation, error) + func GetInvitationByCode(code string, organizationName string, lang string) (*Invitation, string) + func GetInvitations(owner string) ([]*Invitation, error) + func GetMaskedInvitation(invitation *Invitation) *Invitation + func GetPaginationInvitations(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Invitation, error) + func (invitation *Invitation) GetId() string + func (invitation *Invitation) IsInvitationCodeValid(application *Application, invitationCode string, username string, email string, ...) (bool, string) + func (invitation *Invitation) SimpleCheckInvitationCode(invitationCode string, lang string) (bool, string) + type KeyDescriptor struct + KeyInfo KeyInfo + Use string + XMLName xml.Name + type KeyInfo struct + X509Data X509Data + XMLName xml.Name + type Ldap struct + AutoSync int + BaseDn string + CreatedTime string + DefaultGroup string + EnableSsl bool + Filter string + FilterFields []string + Host string + Id string + LastSync string + Owner string + Password string + Port int + ServerName string + Username string + func GetLdap(id string) (*Ldap, error) + func GetLdaps(owner string) ([]*Ldap, error) + func GetMaskedLdap(ldap *Ldap, errs ...error) (*Ldap, error) + func GetMaskedLdaps(ldaps []*Ldap, errs ...error) ([]*Ldap, error) + func (ldap *Ldap) GetLdapConn() (c *LdapConn, err error) + type LdapAutoSynchronizer struct + func GetLdapAutoSynchronizer() *LdapAutoSynchronizer + func NewLdapAutoSynchronizer() *LdapAutoSynchronizer + func (l *LdapAutoSynchronizer) LdapAutoSynchronizerStartUpAll() error + func (l *LdapAutoSynchronizer) StartAutoSync(ldapId string) error + func (l *LdapAutoSynchronizer) StopAutoSync(ldapId string) + type LdapConn struct + Conn *goldap.Conn + IsAD bool + func (l *LdapConn) Close() + func (l *LdapConn) GetLdapUsers(ldapServer *Ldap) ([]LdapUser, error) + type LdapUser struct + Address string + Cn string + DisplayName string + Email string + EmailAddress string + GidNumber string + GroupId string + Mail string + MemberOf string + Mobile string + MobileTelephoneNumber string + PostalAddress string + RegisteredAddress string + TelephoneNumber string + Uid string + UidNumber string + UserPrincipalName string + Uuid string + func AutoAdjustLdapUser(users []LdapUser) []LdapUser + func (ldapUser *LdapUser) GetLdapUuid() string + type Link struct + Href string + Rel string + Sizes string + type ManagedAccount struct + Application string + Password string + SigninUrl string + Username string + type MfaAccount struct + AccountName string + Issuer string + SecretKey string + type MfaInterface interface + Enable func(user *User) error + Initiate func(userId string) (*MfaProps, error) + SetupVerify func(passcode string) error + Verify func(passcode string) error + func GetMfaUtil(mfaType string, config *MfaProps) MfaInterface + type MfaItem struct + Name string + Rule string + type MfaProps struct + CountryCode string + Enabled bool + IsPreferred bool + MfaType string + RecoveryCodes []string + Secret string + URL string + func GetAllMfaProps(user *User, masked bool) []*MfaProps + type Model struct + CreatedTime string + Description string + DisplayName string + ModelText string + Name string + Owner string + func GetModel(id string) (*Model, error) + func GetModelEx(id string) (*Model, error) + func GetModels(owner string) ([]*Model, error) + func GetPaginationModels(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Model, error) + func (m *Model) GetId() string + type NameIDFormat struct + Value string + type OIDCAddress struct + Country string + Formatted string + Locality string + PostalCode string + Region string + StreetAddress string + type OidcDiscovery struct + AuthorizationEndpoint string + ClaimsSupported []string + EndSessionEndpoint string + GrantTypesSupported []string + IdTokenSigningAlgValuesSupported []string + IntrospectionEndpoint string + Issuer string + JwksUri string + RequestObjectSigningAlgValuesSupported []string + RequestParameterSupported bool + ResponseModesSupported []string + ResponseTypesSupported []string + ScopesSupported []string + SubjectTypesSupported []string + TokenEndpoint string + UserinfoEndpoint string + func GetOidcDiscovery(host string) OidcDiscovery + type Organization struct + AccountItems []*AccountItem + CountryCodes []string + CreatedTime string + DefaultApplication string + DefaultAvatar string + DefaultPassword string + DisplayName string + EnableSoftDeletion bool + EnableTour bool + Favicon string + InitScore int + IsProfilePublic bool + Languages []string + Logo string + LogoDark string + MasterPassword string + MasterVerificationCode string + MfaItems []*MfaItem + Name string + Owner string + PasswordOptions []string + PasswordSalt string + PasswordType string + Tags []string + ThemeData *ThemeData + UseEmailAsUsername bool + WebsiteUrl string + func GetMaskedOrganization(organization *Organization, errs ...error) (*Organization, error) + func GetMaskedOrganizations(organizations []*Organization, errs ...error) ([]*Organization, error) + func GetOrganization(id string) (*Organization, error) + func GetOrganizationByUser(user *User) (*Organization, error) + func GetOrganizations(owner string, name ...string) ([]*Organization, error) + func GetOrganizationsByFields(owner string, fields ...string) ([]*Organization, error) + func GetPaginationOrganizations(owner string, name string, offset, limit int, ...) ([]*Organization, error) + func (org *Organization) GetInitScore() (int, error) + type OriginalUser = User + type Ormer struct + Db *sql.DB + Engine *xorm.Engine + func NewAdapter(driverName string, dataSourceName string, dbName string) (*Ormer, error) + func NewAdapterFromDb(driverName string, dataSourceName string, dbName string, db *sql.DB) (*Ormer, error) + func (a *Ormer) CreateDatabase() error + type Payment struct + CreatedTime string + Currency string + Detail string + DisplayName string + InvoiceRemark string + InvoiceTaxId string + InvoiceTitle string + InvoiceType string + InvoiceUrl string + IsRecharge bool + Message string + Name string + OutOrderId string + Owner string + PayUrl string + PersonEmail string + PersonIdCard string + PersonName string + PersonPhone string + Price float64 + ProductDisplayName string + ProductName string + Provider string + ReturnUrl string + State pp.PaymentState + SuccessUrl string + Tag string + Type string + User string + func BuyProduct(id string, user *User, ...) (payment *Payment, attachInfo map[string]interface{}, err error) + func GetPaginationPayments(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Payment, error) + func GetPayment(id string) (*Payment, error) + func GetPayments(owner string) ([]*Payment, error) + func GetUserPayments(owner, user string) ([]*Payment, error) + func NotifyPayment(body []byte, owner string, paymentName string) (*Payment, error) + func VerifyInvitation(id string) (payment *Payment, attachInfo map[string]interface{}, err error) + func (payment *Payment) GetId() string + type Permission struct + Actions []string + Adapter string + ApproveTime string + Approver string + CreatedTime string + Description string + DisplayName string + Domains []string + Effect string + Groups []string + IsEnabled bool + Model string + Name string + Owner string + ResourceType string + Resources []string + Roles []string + State string + Submitter string + Users []string + func GetMaskedPermissions(permissions []*Permission) []*Permission + func GetPaginationPermissions(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Permission, error) + func GetPermission(id string) (*Permission, error) + func GetPermissions(owner string) ([]*Permission, error) + func GetPermissionsByModel(owner string, model string) ([]*Permission, error) + func GetPermissionsByResource(resourceId string) ([]*Permission, error) + func GetPermissionsByRole(roleId string) ([]*Permission, error) + func GetPermissionsBySubmitter(owner string, submitter string) ([]*Permission, error) + func (p *Permission) GetId() string + func (p *Permission) GetModelAndAdapter() string + type Plan struct + CreatedTime string + Currency string + Description string + DisplayName string + IsEnabled bool + Name string + Options []string + Owner string + PaymentProviders []string + Period string + Price float64 + Product string + Role string + func GetPaginatedPlans(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Plan, error) + func GetPlan(id string) (*Plan, error) + func GetPlans(owner string) ([]*Plan, error) + func (plan *Plan) GetId() string + type Pricing struct + Application string + CreatedTime string + Description string + DisplayName string + IsEnabled bool + Name string + Owner string + Plans []string + TrialDuration int + func GetApplicationDefaultPricing(owner, appName string) (*Pricing, error) + func GetPaginatedPricings(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Pricing, error) + func GetPricing(id string) (*Pricing, error) + func GetPricings(owner string) ([]*Pricing, error) + func (pricing *Pricing) GetId() string + func (pricing *Pricing) HasPlan(planName string) (bool, error) + type Product struct + CreatedTime string + Currency string + Description string + Detail string + DisplayName string + Image string + IsRecharge bool + Name string + Owner string + Price float64 + ProviderObjs []*Provider + Providers []string + Quantity int + ReturnUrl string + Sold int + State string + Tag string + func CreateProductForPlan(plan *Plan) *Product + func GetPaginationProducts(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Product, error) + func GetProduct(id string) (*Product, error) + func GetProducts(owner string) ([]*Product, error) + func (product *Product) GetId() string + type PrometheusInfo struct + ApiLatency []HistogramVecInfo + ApiThroughput []GaugeVecInfo + TotalThroughput float64 + func GetPrometheusInfo() (*PrometheusInfo, error) + type Provider struct + AppId string + Bucket string + Category string + Cert string + ClientId string + ClientId2 string + ClientSecret string + ClientSecret2 string + Content string + CreatedTime string + CustomAuthUrl string + CustomLogo string + CustomTokenUrl string + CustomUserInfoUrl string + DisableSsl bool + DisplayName string + Domain string + EnableSignAuthnRequest bool + Endpoint string + Host string + IdP string + IntranetEndpoint string + IssuerUrl string + Metadata string + Method string + Name string + Owner string + PathPrefix string + Port int + ProviderUrl string + Receiver string + RegionId string + Scopes string + SignName string + SubType string + TemplateCode string + Title string + Type string + UserMapping map[string]string + func GetCaptchaProviderByApplication(applicationId, isCurrentProvider, lang string) (*Provider, error) + func GetCaptchaProviderByOwnerName(applicationId, lang string) (*Provider, error) + func GetGlobalProviders() ([]*Provider, error) + func GetMaskedProvider(provider *Provider, isMaskEnabled bool) *Provider + func GetMaskedProviders(providers []*Provider, isMaskEnabled bool) []*Provider + func GetPaginationGlobalProviders(offset, limit int, field, value, sortField, sortOrder string) ([]*Provider, error) + func GetPaginationProviders(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Provider, error) + func GetProvider(id string) (*Provider, error) + func GetProviders(owner string) ([]*Provider, error) + func GetWechatMiniProgramProvider(application *Application) *Provider + func (p *Provider) GetId() string + type ProviderItem struct + CanSignIn bool + CanSignUp bool + CanUnlink bool + CountryCodes []string + Name string + Owner string + Prompted bool + Provider *Provider + Rule string + SignupGroup string + func (pi *ProviderItem) IsProviderVisible() bool + type RadiusAccounting struct + AcctInputPackets int64 + AcctInputTotal int64 + AcctOutputPackets int64 + AcctOutputTotal int64 + AcctSessionId string + AcctSessionTime int64 + AcctStartTime time.Time + AcctStopTime time.Time + AcctTerminateCause int64 + CreatedTime time.Time + FramedIpAddr string + FramedIpNetmask string + LastUpdate time.Time + Name string + NasId string + NasIpAddr string + NasPort int64 + NasPortId string + NasPortType int64 + Owner string + ServiceType int64 + Username string + func GetRadiusAccounting(id string) (*RadiusAccounting, error) + func GetRadiusAccountingBySessionId(sessionId string) (*RadiusAccounting, error) + func (ra *RadiusAccounting) GetId() string + type Record struct + type Resource struct + Application string + CreatedTime string + Description string + FileFormat string + FileName string + FileSize int + FileType string + Name string + Owner string + Parent string + Provider string + Tag string + Url string + User string + func GetDirectResources(owner string, user string, provider *Provider, prefix string, lang string) ([]*Resource, error) + func GetPaginationResources(owner, user string, offset, limit int, ...) ([]*Resource, error) + func GetResource(id string) (*Resource, error) + func GetResources(owner string, user string) ([]*Resource, error) + func (resource *Resource) GetId() string + type Response struct + Msg string + Status string + type Role struct + CreatedTime string + Description string + DisplayName string + Domains []string + Groups []string + IsEnabled bool + Name string + Owner string + Roles []string + Users []string + func GetAncestorRoles(roleIds ...string) ([]*Role, error) + func GetMaskedRoles(roles []*Role) []*Role + func GetPaginationRoles(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Role, error) + func GetRole(id string) (*Role, error) + func GetRoles(owner string) ([]*Role, error) + func (role *Role) GetId() string + type Saml11AssertionArtifact struct + InnerXML string + XMLName xml.Name + type Saml11Request struct + AssertionArtifact Saml11AssertionArtifact + IssueInstant string + MajorVersion string + MinorVersion string + RequestID string + SAMLP string + XMLName xml.Name + type SamlItem struct + Name string + NameFormat string + Value string + type Session struct + Application string + CreatedTime string + Name string + Owner string + SessionId []string + func GetPaginationSessions(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Session, error) + func GetSessions(owner string) ([]*Session, error) + func GetSingleSession(id string) (*Session, error) + func (session *Session) GetId() string + type SigninItem struct + CustomCss string + IsCustom bool + Label string + Name string + Placeholder string + Rule string + Visible bool + type SigninMethod struct + DisplayName string + Name string + Rule string + type SignupItem struct + CustomCss string + Label string + Name string + Options []string + Placeholder string + Prompted bool + Regex string + Required bool + Rule string + Type string + Visible bool + type SingleSignOnService struct + Binding string + Location string + type SmsMfa struct + func NewEmailMfaUtil(config *MfaProps) *SmsMfa + func NewSmsMfaUtil(config *MfaProps) *SmsMfa + func (mfa *SmsMfa) Enable(user *User) error + func (mfa *SmsMfa) Initiate(userId string) (*MfaProps, error) + func (mfa *SmsMfa) SetupVerify(passCode string) error + func (mfa *SmsMfa) Verify(passCode string) error + type Subscription struct + CreatedTime string + Description string + DisplayName string + EndTime time.Time + Name string + Owner string + Payment string + Period string + Plan string + Pricing string + StartTime time.Time + State SubscriptionState + User string + func GetPaginationSubscriptions(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Subscription, error) + func GetSubscription(id string) (*Subscription, error) + func GetSubscriptions(owner string) ([]*Subscription, error) + func GetSubscriptionsByUser(owner, userName string) ([]*Subscription, error) + func NewSubscription(owner, userName, planName, paymentName, period string) *Subscription + func (sub *Subscription) GetId() string + func (sub *Subscription) UpdateState() error + type SubscriptionState string + const SubStateActive + const SubStateError + const SubStateExpired + const SubStatePending + const SubStateSuspended + const SubStateUpcoming + type Syncer struct + AffiliationTable string + AvatarBaseUrl string + Cert string + CreatedTime string + Database string + DatabaseType string + ErrorText string + Host string + IsEnabled bool + IsReadOnly bool + Name string + Organization string + Ormer *Ormer + Owner string + Password string + Port int + SshHost string + SshPassword string + SshPort int + SshType string + SshUser string + SslMode string + SyncInterval int + Table string + TableColumns []*TableColumn + Type string + User string + func GetMaskedSyncer(syncer *Syncer, errs ...error) (*Syncer, error) + func GetMaskedSyncers(syncers []*Syncer, errs ...error) ([]*Syncer, error) + func GetOrganizationSyncers(owner, organization string) ([]*Syncer, error) + func GetPaginationSyncers(owner, organization string, offset, limit int, ...) ([]*Syncer, error) + func GetSyncer(id string) (*Syncer, error) + func GetSyncers(owner string) ([]*Syncer, error) + func (syncer *Syncer) GetId() string + type TableColumn struct + CasdoorName string + IsHashed bool + IsKey bool + Name string + Type string + Values []string + type ThemeData struct + BorderRadius int + ColorPrimary string + IsCompact bool + IsEnabled bool + ThemeType string + type Token struct + AccessToken string + AccessTokenHash string + Application string + Code string + CodeChallenge string + CodeExpireIn int64 + CodeIsUsed bool + CreatedTime string + ExpiresIn int + Name string + Organization string + Owner string + RefreshToken string + RefreshTokenHash string + Scope string + TokenType string + User string + func GetPaginationTokens(owner, organization string, offset, limit int, ...) ([]*Token, error) + func GetToken(id string) (*Token, error) + func GetTokenByAccessToken(accessToken string) (*Token, error) + func GetTokenByRefreshToken(refreshToken string) (*Token, error) + func GetTokenByTokenValue(tokenValue, tokenTypeHint string) (*Token, error) + func GetTokenByUser(application *Application, user *User, scope string, nonce string, host string) (*Token, error) + func GetTokens(owner string, organization string) ([]*Token, error) + func (token *Token) GetId() string + type TokenError struct + Error string + ErrorDescription string + type TokenWrapper struct + AccessToken string + ExpiresIn int + IdToken string + RefreshToken string + Scope string + TokenType string + type TotpMfa struct + func NewTotpMfaUtil(config *MfaProps) *TotpMfa + func (mfa *TotpMfa) Enable(user *User) error + func (mfa *TotpMfa) Initiate(userId string) (*MfaProps, error) + func (mfa *TotpMfa) SetupVerify(passcode string) error + func (mfa *TotpMfa) Verify(passcode string) error + type Transaction struct + Amount float64 + Application string + Category string + CreatedTime string + Currency string + Detail string + DisplayName string + Name string + Owner string + Payment string + ProductDisplayName string + ProductName string + Provider string + ReturnUrl string + State pp.PaymentState + Tag string + Type string + User string + func GetPaginationTransactions(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Transaction, error) + func GetTransaction(id string) (*Transaction, error) + func GetTransactions(owner string) ([]*Transaction, error) + func GetUserTransactions(owner, user string) ([]*Transaction, error) + func (transaction *Transaction) GetId() string + type User struct + AccessKey string + AccessSecret string + AccessToken string + Address []string + Adfs string + Affiliation string + Alipay string + Amazon string + Apple string + Auth0 string + Avatar string + AvatarType string + AzureAD string + AzureADB2c string + Baidu string + Balance float64 + BattleNet string + Bilibili string + Bio string + Birthday string + Bitbucket string + Box string + Casdoor string + CloudFoundry string + CountryCode string + CreatedIp string + CreatedTime string + Currency string + Custom string + Dailymotion string + Deezer string + DeletedTime string + DigitalOcean string + DingTalk string + Discord string + DisplayName string + Douyin string + Dropbox string + Education string + Email string + EmailVerified bool + EveOnline string + ExternalId string + FaceIds []*FaceId + Facebook string + FirstName string + Fitbit string + Gender string + GitHub string + Gitea string + Gitee string + Gitlab string + Google string + Groups []string + Hash string + Heroku string + Homepage string + Id string + IdCard string + IdCardType string + InfluxCloud string + Infoflow string + Instagram string + Intercom string + Invitation string + InvitationCode string + IsAdmin bool + IsDefaultAvatar bool + IsDeleted bool + IsForbidden bool + IsOnline bool + Kakao string + Karma int + Language string + Lark string + LastName string + LastSigninIp string + LastSigninTime string + LastSigninWrongTime string + Lastfm string + Ldap string + Line string + LinkedIn string + Location string + Mailru string + ManagedAccounts []ManagedAccount + Meetup string + MetaMask string + MfaAccounts []MfaAccount + MfaEmailEnabled bool + MfaPhoneEnabled bool + MicrosoftOnline string + MultiFactorAuths []*MfaProps + Name string + Naver string + NeedUpdatePassword bool + Nextcloud string + Okta string + OneDrive string + Oura string + Owner string + Password string + PasswordSalt string + PasswordType string + Patreon string + Paypal string + PermanentAvatar string + Permissions []*Permission + Phone string + PreHash string + PreferredMfaType string + Properties map[string]string + QQ string + Ranking int + RecoveryCodes []string + Region string + Roles []*Role + SalesForce string + Score int + Shopify string + SigninWrongTimes int + SignupApplication string + Slack string + Soundcloud string + Spotify string + Steam string + Strava string + Stripe string + Tag string + TikTok string + Title string + TotpSecret string + Tumblr string + Twitch string + Twitter string + Type string + Typetalk string + Uber string + UpdatedTime string + VK string + WeChat string + Web3Onboard string + WebauthnCredentials []webauthn.Credential + Wecom string + Weibo string + Wepay string + Xero string + Yahoo string + Yammer string + Yandex string + Zoom string + func CheckUserPassword(organization string, username string, password string, lang string, ...) (*User, error) + func ExtendManagedAccountsWithUser(user *User) (*User, error) + func GetGlobalUsers() ([]*User, error) + func GetGlobalUsersWithFilter(cond builder.Cond) ([]*User, error) + func GetGroupUsers(groupId string) ([]*User, error) + func GetMaskedUser(user *User, isAdminOrSelf bool, errs ...error) (*User, error) + func GetMaskedUsers(users []*User, errs ...error) ([]*User, error) + func GetPaginationGlobalUsers(offset, limit int, field, value, sortField, sortOrder string) ([]*User, error) + func GetPaginationGroupUsers(groupId string, offset, limit int, field, value, sortField, sortOrder string) ([]*User, error) + func GetPaginationUsers(owner string, offset, limit int, field, value, sortField, sortOrder string, ...) ([]*User, error) + func GetSortedUsers(owner string, sorter string, limit int) ([]*User, error) + func GetUser(id string) (*User, error) + func GetUserByAccessKey(accessKey string) (*User, error) + func GetUserByEmail(owner string, email string) (*User, error) + func GetUserByEmailOnly(email string) (*User, error) + func GetUserByField(organizationName string, field string, value string) (*User, error) + func GetUserByFields(organization string, field string) (*User, error) + func GetUserByInvitationCode(owner string, invitationCode string) (*User, error) + func GetUserByPhone(owner string, phone string) (*User, error) + func GetUserByPhoneOnly(phone string) (*User, error) + func GetUserByUserId(owner string, userId string) (*User, error) + func GetUserByUserIdOnly(userId string) (*User, error) + func GetUserNoCheck(id string) (*User, error) + func GetUsers(owner string) ([]*User, error) + func GetUsersByTagWithFilter(owner string, tag string, cond builder.Cond) ([]*User, error) + func GetUsersWithFilter(owner string, cond builder.Cond) ([]*User, error) + func (user *User) AddCredentials(credential webauthn.Credential, isGlobalAdmin bool) (bool, error) + func (user *User) CredentialExcludeList() []protocol.CredentialDescriptor + func (user *User) DeleteCredentials(credentialIdBase64 string) (bool, error) + func (user *User) GetCountryCode(countryCode string) string + func (user *User) GetFriendlyName() string + func (user *User) GetId() string + func (user *User) GetMfaProps(mfaType string, masked bool) *MfaProps + func (user *User) GetPreferredMfaProps(masked bool) *MfaProps + func (user *User) IsAdminUser() bool + func (user *User) IsApplicationAdmin(application *Application) bool + func (user *User) IsGlobalAdmin() bool + func (user *User) IsMfaEnabled() bool + func (user *User) UpdateUserHash() error + func (user *User) UpdateUserPassword(organization *Organization) + func (user *User) WebAuthnCredentials() []webauthn.Credential + func (user *User) WebAuthnDisplayName() string + func (user *User) WebAuthnID() []byte + func (user *User) WebAuthnIcon() string + func (user *User) WebAuthnName() string + type UserGroupEnforcer struct + func NewUserGroupEnforcer(enforcer *casbin.Enforcer) *UserGroupEnforcer + func (e *UserGroupEnforcer) AddGroupForUser(user string, group string) (bool, error) + func (e *UserGroupEnforcer) AddGroupsForUser(user string, groups []string) (bool, error) + func (e *UserGroupEnforcer) DeleteGroupForUser(user string, group string) (bool, error) + func (e *UserGroupEnforcer) DeleteGroupsForUser(user string) (bool, error) + func (e *UserGroupEnforcer) GetAllUsersByGroup(group string) ([]string, error) + func (e *UserGroupEnforcer) GetGroupsForUser(user string) ([]string, error) + func (e *UserGroupEnforcer) GetUserNamesByGroupName(groupName string) ([]string, error) + func (e *UserGroupEnforcer) UpdateGroupsForUser(user string, groups []string) (bool, error) + type UserShort struct + Avatar string + DisplayName string + Email string + Id string + Name string + Owner string + Phone string + type UserWithoutThirdIdp struct + AccessKey string + AccessSecret string + Address []string + Affiliation string + Avatar string + AvatarType string + Bio string + Birthday string + CountryCode string + CreatedIp string + CreatedTime string + DeletedTime string + DingTalk string + DisplayName string + Education string + Email string + EmailVerified bool + Facebook string + FirstName string + Gender string + GitHub string + Gitee string + Gitlab string + Google string + Groups []string + Hash string + Homepage string + Id string + IdCard string + IdCardType string + IsAdmin bool + IsDefaultAvatar bool + IsDeleted bool + IsForbidden bool + IsOnline bool + Karma int + Language string + Lark string + LastName string + LastSigninIp string + LastSigninTime string + LastSigninWrongTime string + Ldap string + LinkedIn string + Location string + ManagedAccounts []ManagedAccount + MfaEmailEnabled bool + MfaPhoneEnabled bool + Name string + Owner string + Password string + PasswordSalt string + PasswordType string + PermanentAvatar string + Permissions []*Permission + Phone string + PreHash string + PreferredMfaType string + Properties map[string]string + QQ string + Ranking int + RecoveryCodes []string + Region string + Roles []*Role + Score int + SigninWrongTimes int + SignupApplication string + Tag string + Title string + TotpSecret string + Type string + UpdatedTime string + WeChat string + Wecom string + Weibo string + type Userinfo struct + Address string + Aud string + Avatar string + DisplayName string + Email string + EmailVerified bool + Groups []string + Iss string + Name string + Permissions []string + Phone string + Roles []string + Sub string + func GetUserInfo(user *User, scope string, aud string, host string) (*Userinfo, error) + type ValidatorFunc func(password string) string + type VerificationRecord struct + Code string + CreatedTime string + IsUsed bool + Name string + Owner string + Provider string + Receiver string + RemoteAddr string + Time int64 + Type string + User string + func GetPaginationVerifications(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*VerificationRecord, error) + func GetUserVerifications(owner, user string) ([]*VerificationRecord, error) + func GetVerification(id string) (*VerificationRecord, error) + func GetVerifications(owner string) ([]*VerificationRecord, error) + type VerifyResult struct + Code int + Msg string + func CheckVerificationCode(dest string, code string, lang string) (*VerifyResult, error) + type ViaSSHDialer struct + Client *ssh.Client + Context *context.Context + DatabaseType string + func (v *ViaSSHDialer) Dial(network, address string) (net.Conn, error) + func (v *ViaSSHDialer) DialContext(ctx context.Context, network string, addr string) (net.Conn, error) + func (v *ViaSSHDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) + func (v *ViaSSHDialer) MysqlDial(ctx context.Context, addr string) (net.Conn, error) + func (v *ViaSSHDialer) Open(s string) (_ driver.Conn, err error) + type WebFinger struct + Aliases *[]string + Links []WebFingerLink + Properties *map[string]string + Subject string + func GetWebFinger(resource string, rels []string, host string) (WebFinger, error) + type WebFingerLink struct + Href string + Rel string + type Webhook struct + ContentType string + CreatedTime string + Events []string + Headers []*Header + IsEnabled bool + IsUserExtended bool + Method string + Name string + Organization string + Owner string + SingleOrgOnly bool + Url string + func GetPaginationWebhooks(owner, organization string, offset, limit int, ...) ([]*Webhook, error) + func GetWebhook(id string) (*Webhook, error) + func GetWebhooks(owner string, organization string) ([]*Webhook, error) + func (p *Webhook) GetId() string + type X509Certificate struct + Cert string + XMLName xml.Name + type X509Data struct + X509Certificate X509Certificate + XMLName xml.Name + type X509Key struct + PrivateKey string + X509Certificate string + func (x X509Key) GetKeyPair() (privateKey *rsa.PrivateKey, cert []byte, err error)