hydra-webauthn/internal/storage/registration_link.go

18 lines
339 B
Go
Raw Permalink Normal View History

2023-11-15 20:38:25 +01:00
package storage
import "time"
type RegistrationLink struct {
Token string `json:"token"`
UserID string `json:"userId"`
CreatedAt time.Time `json:"createdAt"`
}
func NewRegistrationLink(userID string) *RegistrationLink {
return &RegistrationLink{
UserID: userID,
Token: NewID(),
CreatedAt: time.Now(),
}
}