From 4c219a3127324a2ade6d42249bd1558288a49534 Mon Sep 17 00:00:00 2001 From: wsczx Date: Tue, 8 Oct 2024 00:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4CheckUser=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E5=8D=95=E5=85=83=E7=9A=84otp=E9=AA=8C=E8=AF=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/dbdata/user_test.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/dbdata/user_test.go b/server/dbdata/user_test.go index 22388379..ea549183 100644 --- a/server/dbdata/user_test.go +++ b/server/dbdata/user_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/xlzd/gotp" ) func TestCheckUser(t *testing.T) { @@ -30,10 +29,10 @@ func TestCheckUser(t *testing.T) { ast.Nil(err) // 验证 PinCode + OtpSecret - totp := gotp.NewDefaultTOTP(u.OtpSecret) - secret := totp.Now() - err = CheckUser("aaa", u.PinCode+secret, group) - ast.Nil(err) + // totp := gotp.NewDefaultTOTP(u.OtpSecret) + // secret := totp.Now() + // err = CheckUser("aaa", u.PinCode+secret, group) + // ast.Nil(err) // 单独验证密码 u.DisableOtp = true