代码拉取完成,页面将自动刷新
package authing
import (
"gitee.com/carlmax_my/console-core-go/pkg/authing/authing_model"
"gitee.com/carlmax_my/console-core-go/pkg/authing/authing_v2"
"gitee.com/carlmax_my/console-core-go/pkg/authing/authing_v3"
)
type BaseAuthingCli interface {
PrintOptions()
GetAppId() string
GetAppHost() string
ResetAuthCli(appId, appSecret, appHost, appRedirectUri, appLogoutRedirectUri, accessToken string)
ResetCliTenantId(tenantId string)
// region app
DelApp(appId string) error
FindAppById(appId string) *authing_model.Application
FindApp() *authing_model.Application
CreateApp(info *authing_model.CreateApplicationReq) (*authing_model.Application, error)
UpdateAppMfa(enabledFactors []string, disabledFactors []string) []string
// endregion app
BuildClientAuthUrl(appHost, state, redirectUri string, tenantId *string) string
BuildLogoutUrl(redirectUri string, idToken *string) string
PostAccountLogin(appId, tenantId string, payload interface{}) (interface{}, error)
PostPhoneCodeLogin(appId, tenantId string, payload interface{}) (interface{}, error)
PostEmailCodeLogin(appId, tenantId string, payload interface{}) (interface{}, error)
GetMeInfo(appId, tenantId, authorization string) (interface{}, error)
FindUserWhenLogin(appId, tenantId, key, loginType string) (interface{}, error)
SendEmailWhenLogin(appId, tenantId string, payload interface{}) (interface{}, error)
SendSmsWhenLogin(appId, tenantId string, payload interface{}) (interface{}, error)
GetLoginStatus(appId, tenantId string, payload interface{}) (interface{}, error)
GetCheckAppIsShowCode(appId string, tenantId string) (interface{}, error)
GetAppComponentPublicConfig(appId string, tenantId string) (interface{}, error)
GetAppPublicConfig(appId string, tenantId string) (interface{}, error)
PostGraphqlV2(appId string, tenantId string, payload any) (interface{}, error)
GetUserInfoByAccessToken(code string) (*authing_model.AuthingSessionUserInfo, error)
GetAccessTokenByCode(code, redirectUri string) (string, error)
RevokeToken(token string) error
SetAccessToken(token string)
// region tenant
GetAppTenantList() (list *[]authing_model.TenantDetails, err error)
GetTenantList() (list *[]authing_model.Tenant)
CreateTenant(tenantInfo *authing_model.CreateTenantRequest) (*authing_model.TenantDetails, error)
AddTenantMembers(tenantId, userId *string) error
UpdateTenant(id *string, tenantInfo *authing_model.CreateTenantRequest) (bool, error)
UpdateTenant_ExtraInfo(tenantId string, request *authing_model.UpdateTenantExtraReq) (bool, error)
RemoveTenant(tenantId *string) (*string, error)
UpdateTenant_loginPage(tenantId string, loginCfg *authing_model.MyAuthingLoginConfig) error
// endregion tenant
// region group
AddUserToGroup(userId *string, groupCode string) error
// endregion group
// region user
GetUser(userId *string) (*authing_model.User, error)
DeleteUser(id *string) (bool, error)
CreateUser(userInfo *authing_model.CreateUserInput) (*authing_model.User, error)
UpdateUser(id *string, user *authing_model.UpdateUserInput) error
ActiveUser(id *string) error
DeActiveUser(id *string) error
// endregion user
// region idp
// CreateIdp(name, idpType string) (bool, error)
CreateIdp(name, idpType string) (string, error)
UpdateIdp(idpId string, name string) error
DeleteIdp(idpId string) error
CreateIdpConnection(idpId string, connType string, identifier string, displayName string, fields interface{}) (string, error)
UpdateIdpConnection(idpConnectionId string, displayName string, fields interface{}) error
DeleteIdpConnection(idpConnectionId string) error
CreateIdp4Tenant(name, idpType, tenantId string) (string, error)
UpdateIdp4Tenant(idpId string, tenantId string, name string) error
DeleteIdp4Tenant(idpId string, tenantId string) error
CreateIdpConnection4Tenant(idpId string, tenantId string, connType string, identifier string, displayName string, fields interface{}) (string, error)
UpdateIdpConnection4Tenant(idpConnectionId string, tenantId string, displayName string, fields interface{}) error
DeleteIdpConnection4Tenant(idpConnectionId string, tenantId string) error
ChangeIdpConnectionState4App(idpConnectionId string, enable bool) error
ChangeIdpConnectionState4Tenant(idpConnectionId string, enable bool, tenantId string, isCreate bool) error
AutoJoinUserToTenant(idpId string, enable bool, tenantId string) error
// SMS,OTP,EMAIL
ChangeIdpConnectionMfa4Tenant(idpConnectionId string, tenantId string, EnabledFactors []string) error
// endregion idp
}
// tenant id will not set to header for v2 sdk
func GetAuthingCliV2() BaseAuthingCli {
return authing_v2.NewAuthingCli()
}
func GetAuthingCliV3(tenantId *string) BaseAuthingCli {
return authing_v3.NewAuthingCli(tenantId, true)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。