mirror of
https://github.com/twofas/2fas-server.git
synced 2024-12-12 12:09:56 +01:00
dbd4245b6f
* initial version of pairing and proxy * apply review comments and rework proxy * delete expires pairs
20 lines
246 B
Go
20 lines
246 B
Go
package pairing
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type MobileDevice struct {
|
|
DeviceID string
|
|
FCMToken string
|
|
}
|
|
|
|
type PairingInfo struct {
|
|
Device MobileDevice
|
|
PairedAt time.Time
|
|
}
|
|
|
|
func (pi *PairingInfo) IsPaired() bool {
|
|
return !pi.PairedAt.IsZero()
|
|
}
|