fix: import totp in add human user with secret (#7936)

* fix: import totp in add human user with secret

* fix: import totp in add human user with secret

* fix: import totp in add human user with secret

* fix: review comment changes
This commit is contained in:
Stefan Benz
2024-05-14 09:20:31 +02:00
committed by GitHub
parent 15d5338b91
commit 0e9ebed8d0
13 changed files with 397 additions and 53 deletions

View File

@@ -829,7 +829,9 @@ func TestCheckTOTP(t *testing.T) {
ctx := authz.NewMockContext("instance1", "org1", "user1")
cryptoAlg := crypto.CreateMockEncryptionAlg(gomock.NewController(t))
key, secret, err := domain.NewTOTPKey("example.com", "user1", cryptoAlg)
key, err := domain.NewTOTPKey("example.com", "user1")
require.NoError(t, err)
secret, err := crypto.Encrypt([]byte(key.Secret()), cryptoAlg)
require.NoError(t, err)
sessAgg := &session.NewAggregate("session1", "instance1").Aggregate