mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:17:32 +00:00
chore: cleanup command/crypto (#5883)
* chore: cleanup command/crypto * cleanup unused function mockEmailCode
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/zitadel/logging"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
"github.com/zitadel/zitadel/internal/command/preparation"
|
||||
"github.com/zitadel/zitadel/internal/crypto"
|
||||
"github.com/zitadel/zitadel/internal/domain"
|
||||
caos_errs "github.com/zitadel/zitadel/internal/errors"
|
||||
@@ -132,7 +133,7 @@ func (c *Commands) addUserPasskeyCode(ctx context.Context, userID, resourceOwner
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
code, err := c.newCode(ctx, c.eventstore.Filter, domain.SecretGeneratorTypePasswordlessInitCode, alg)
|
||||
code, err := c.newPasskeyCode(ctx, c.eventstore.Filter, alg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -154,3 +155,7 @@ func (c *Commands) addUserPasskeyCode(ctx context.Context, userID, resourceOwner
|
||||
Code: code.Plain,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Commands) newPasskeyCode(ctx context.Context, filter preparation.FilterToQueryReducer, alg crypto.EncryptionAlgorithm) (*CryptoCode, error) {
|
||||
return c.newCode(ctx, filter, domain.SecretGeneratorTypePasswordlessInitCode, alg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user