Documentation
¶
Index ¶
Constants ¶
View Source
const CookieName = "autentico_trusted_device"
Variables ¶
This section is empty.
Functions ¶
func CreateTrustedDevice ¶
func CreateTrustedDevice(device TrustedDevice) error
func IsDeviceTrusted ¶
IsDeviceTrusted returns true if the request carries a valid, non-expired trusted device token that belongs to the given user.
func ReadCookie ¶
ReadCookie returns the trusted device token from the request, or "" if absent.
func SetCookie ¶
func SetCookie(w http.ResponseWriter, deviceID string, expiry time.Duration)
SetCookie writes the trusted device cookie with the given token and expiry.
func UpdateLastUsed ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.