mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-15 20:38:00 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
36 lines
637 B
Go
36 lines
637 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
es_models "github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
|
)
|
|
|
|
type Password struct {
|
|
es_models.ObjectRoot
|
|
|
|
SecretString string
|
|
SecretCrypto *crypto.CryptoValue
|
|
ChangeRequired bool
|
|
}
|
|
|
|
type PasswordCode struct {
|
|
es_models.ObjectRoot
|
|
|
|
Code *crypto.CryptoValue
|
|
Expiry time.Duration
|
|
NotificationType NotificationType
|
|
}
|
|
|
|
type NotificationType int32
|
|
|
|
const (
|
|
NotificationTypeEmail NotificationType = iota
|
|
NotificationTypeSms
|
|
)
|
|
|
|
func (p *Password) IsValid() bool {
|
|
return p.AggregateID != "" && p.SecretString != ""
|
|
}
|