2022-08-11 15:14:21 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
type Account struct {
|
|
|
|
ID string `json:"id" bson:"_id"`
|
|
|
|
Namespace string `json:"namespace"`
|
|
|
|
Authentication AccountAuth `json:"-" bson:"authentication"`
|
|
|
|
Data map[string]any `json:"data"`
|
|
|
|
Metadata map[string]any `json:"metadata"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AccountAuth struct {
|
|
|
|
Local LocalAuth
|
|
|
|
//TODO handle SSO
|
|
|
|
}
|
|
|
|
|
|
|
|
type LocalAuth struct {
|
|
|
|
Username string `json:"username"`
|
|
|
|
Password string `json:"password"`
|
|
|
|
Email string `json:"email"`
|
|
|
|
EmailValidation Validation `json:"email_validation" bson:"email_validation"`
|
|
|
|
PhoneNumber string `json:"phone_number" bson:"phone_number"`
|
|
|
|
PhoneNumberValidation Validation `json:"phone_number_validation" bson:"phone_number_validation"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Validation struct {
|
2023-04-28 05:53:46 +00:00
|
|
|
Validated bool `json:"validated" bson:"validated"`
|
2022-08-11 15:14:21 +00:00
|
|
|
ValidationCode string `json:"validation_code" bson:"validation_code"`
|
|
|
|
}
|