mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-01 20:32:19 +00:00
23 lines
557 B
Go
23 lines
557 B
Go
package command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/zitadel/internal/command/preparation"
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
"github.com/zitadel/zitadel/internal/domain"
|
|
)
|
|
|
|
type Email struct {
|
|
Address domain.EmailAddress
|
|
Verified bool
|
|
}
|
|
|
|
func (e *Email) Validate() error {
|
|
return e.Address.Validate()
|
|
}
|
|
|
|
func newEmailCode(ctx context.Context, filter preparation.FilterToQueryReducer, alg crypto.EncryptionAlgorithm) (*cryptoCode, error) {
|
|
return newCryptoCodeWithExpiry(ctx, filter, domain.SecretGeneratorTypeVerifyEmailCode, alg)
|
|
}
|