2022-04-12 16:20:17 +02:00
|
|
|
package command
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-04-27 01:01:45 +02:00
|
|
|
"github.com/zitadel/zitadel/internal/command/preparation"
|
|
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
|
|
"github.com/zitadel/zitadel/internal/domain"
|
2022-04-12 16:20:17 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
type Phone struct {
|
2023-03-14 20:20:38 +01:00
|
|
|
Number domain.PhoneNumber
|
2022-04-12 16:20:17 +02:00
|
|
|
Verified bool
|
2023-08-03 06:42:59 +02:00
|
|
|
|
|
|
|
// ReturnCode is used if the Verified field is false
|
|
|
|
ReturnCode bool
|
2022-04-12 16:20:17 +02:00
|
|
|
}
|
|
|
|
|
2024-04-05 12:35:49 +03:00
|
|
|
func (c *Commands) newPhoneCode(ctx context.Context, filter preparation.FilterToQueryReducer, alg crypto.EncryptionAlgorithm) (*EncryptedCode, error) {
|
|
|
|
return c.newEncryptedCode(ctx, filter, domain.SecretGeneratorTypeVerifyPhoneCode, alg)
|
2022-04-12 16:20:17 +02:00
|
|
|
}
|