mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 17:07:32 +00:00
chore: move the go code into a subfolder
This commit is contained in:
35
apps/api/internal/user/model/password.go
Normal file
35
apps/api/internal/user/model/password.go
Normal file
@@ -0,0 +1,35 @@
|
||||
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 != ""
|
||||
}
|
Reference in New Issue
Block a user