| 3 | import "go.mongodb.org/mongo-driver/v2/bson" |
| 4 | |
| 5 | type OAuth struct { |
| 6 | BaseModel `bson:",inline"` |
| 7 | Code string `bson:"code,omitempty"` // OAuth code (authorization code) in Google's implementation is single-use, short-lived, and temporarily unique. |
| 8 | AccessToken string `bson:"access_token,omitempty"` |
| 9 | State string `bson:"state,omitempty"` |
| 10 | Used bool `bson:"used,omitempty"` |
| 11 | UsedAt bson.DateTime `bson:"used_at,omitempty"` // Timestamp when the record was first marked as used, allows 10s reuse window |
| 12 | } |
| 13 | |
| 14 | func (o OAuth) CollectionName() string { |
| 15 | return "oauth" |
nothing calls this directly
no outgoing calls
no test coverage detected