1 Star 0 Fork 0

carlmax_my/console-core-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
.vscode
cmd
pkg
alert
aliyun
api
authing
authing_model
authing_v2
auth_cli.go
authing.go
authing_app.go
authing_cfg.go
authing_global.go
authing_group.go
authing_idp.go
authing_login.go
authing_mfa.go
authing_sdk_fix.go
authing_tenant.go
authing_token.go
authing_user.go
authing_v3
base.go
idp_fields.go
browser
cache
clickhouse
color
core
cron_runner
crypto
ddm
debugs
env
errors
file
geo
httpclient
idp
influxdb
ip_util
jwt
ldap
logger
mail
mfa
model
mongo
mysql
password
redis
shutdown
signature
store
timeutil
trace
urltable
util
validate
viper
websocket
winipcfg
vpn
.gitignore
LICENSE
README.md
go.mod
go.sum
克隆/下载
authing_mfa.go 470 Bytes
一键复制 编辑 原始数据 按行查看 历史
carlmax_my 提交于 3个月前 . init project
package authing_v2
import (
"fmt"
"net/http"
"github.com/samber/lo"
)
// SMS,OTP,EMAIL
func (a *AuthingCli) ChangeGlobalMfa(factor string, enable bool) error {
c := a.Cli
url := fmt.Sprintf("%s/api/v2/applications/%s/mfa/switch", c.Host, a.AuthCli.AppId)
req := &struct {
Status int `json:"status"`
MfaType string `json:"type"` //
}{
Status: lo.Ternary(enable, 1, 0),
MfaType: factor,
}
return a.SendAuthingRequest(url, http.MethodPut, req)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/carlmax_my/console-core-go.git
git@gitee.com:carlmax_my/console-core-go.git
carlmax_my
console-core-go
console-core-go
v0.0.17

搜索帮助