| 函数名 | 函数描述/介绍 |
|---|
| mfa.GetUTCCode | GetUTCCode in twofa lib will receive the secret and return the verify code with utc time |
| mfa.TOTPCode | GetUTCCode in twofa lib will receive the secret and return the verify code with utc time |
| mfa.TOTPVerify | VerifyUTCCode in twofa lib will receive the secret and code, then return the verify result |
| mfa.VerifyUTCCode | VerifyUTCCode in twofa lib will receive the secret and code, then return the verify result |
| mfa.poc | poc 是一个请求选项,设置 Y-T-Verify-Code 的值为 secret 计算出的 UTC 时间验证码,适配于 poc 包 |
函数定义#
GetUTCCode#
详细描述#
GetUTCCode in twofa lib will receive the secret and return the verify code with utc time
GetUTCCode(secret string) string
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|
| r1 | string | |
TOTPCode#
详细描述#
GetUTCCode in twofa lib will receive the secret and return the verify code with utc time
TOTPCode(secret string) string
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|
| r1 | string | |
TOTPVerify#
详细描述#
VerifyUTCCode in twofa lib will receive the secret and code, then return the verify result
TOTPVerify(secret string, code any) bool
| 参数名 | 参数类型 | 参数解释 |
|---|
| secret | string | |
| code | any | |
返回值#
VerifyUTCCode#
详细描述#
VerifyUTCCode in twofa lib will receive the secret and code, then return the verify result
VerifyUTCCode(secret string, code any) bool
| 参数名 | 参数类型 | 参数解释 |
|---|
| secret | string | |
| code | any | |
返回值#
poc#
详细描述#
poc 是一个请求选项,设置 Y-T-Verify-Code 的值为 secret 计算出的 UTC 时间验证码,适配于 poc 包
poc(secret string) poc.PocConfigOption
返回值#
| 返回值(顺序) | 返回值类型 | 返回值解释 |
|---|
| r1 | poc.PocConfigOption | |