-
Notifications
You must be signed in to change notification settings - Fork 0
/
account.go
22 lines (19 loc) · 1019 Bytes
/
account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package types
type Account struct {
Type string `bson:"type" json:"type"`
AccountID string `bson:"accountID" json:"accountID"`
AccountConfirmedAt int64 `bson:"accountConfirmedAt" json:"accountConfirmedAt"`
Password string `bson:"password" json:"password"`
AuthType string `bson:"authType" json:"authType"`
VerificationCode VerificationCode `bson:"verificationCode" json:"verificationCode"`
PreferredLanguage string `bson:"preferredLanguage" json:"preferredLanguage"`
// Rate limiting
FailedLoginAttempts []int64 `bson:"failedLoginAttempts" json:"failedLoginAttempts"`
PasswordResetTriggers []int64 `bson:"passwordResetTriggers" json:"passwordResetTriggers"`
}
type VerificationCode struct {
Code string `bson:"code" json:"code"`
Attempts int64 `bson:"attempts" json:"attempts"`
CreatedAt int64 `bson:"createdAt" json:"createdAt"`
ExpiresAt int64 `bson:"expiresAt" json:"expiresAt"`
}