Skip to content

Commit 4713f65

Browse files
idp-go-sdk: Add bson tags to User struct
1 parent 3d81eef commit 4713f65

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

integrations/idp-go-sdk/idp/model.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import "time"
55
// User represents a user in the identity provider system.
66
// The ID and Email fields are unique identifiers.
77
type User struct {
8-
ID string `json:"id"`
9-
Provider Provider `json:"provider"`
10-
Name string `json:"name"`
11-
Email string `json:"email"`
12-
Verified bool `json:"verified"`
13-
Password string `json:"password"`
14-
Roles []string `json:"roles"` // e.g., ["admin", "user"]
15-
CreatedAt time.Time `json:"created_at"`
16-
IsActive bool `json:"is_active"`
17-
Metadata map[string]string `json:"metadata"` // Additional user metadata
8+
ID string `json:"id" bson:"id"`
9+
Provider Provider `json:"provider" bson:"provider"`
10+
Name string `json:"name" bson:"name"`
11+
Email string `json:"email" bson:"email"`
12+
Verified bool `json:"verified" bson:"verified"`
13+
Password string `json:"password" bson:"password"`
14+
Roles []string `json:"roles" bson:"roles"` // e.g., ["admin", "user"]
15+
CreatedAt time.Time `json:"created_at" bson:"created_at"`
16+
IsActive bool `json:"is_active" bson:"is_active"`
17+
Metadata map[string]string `json:"metadata" bson:"metadata"` // Additional user metadata
1818
}
1919

2020
func (u *User) IsAdmin() bool {

0 commit comments

Comments
 (0)