Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartWebService ¶
func StartWebService(conf conf.ServerConf, _devices *mqtt.DeviceData, _macDb db.UserDb)
Types ¶
type SimpleXSRFCheck ¶
type SimpleXSRFCheck struct {
// contains filtered or unexported fields
}
SimpleXSRFCheck creates/compares and stores the XSRF tokens for the associated ip. After cleanupAfter amount of time a cleanup go routine removes old entries.
func NewSimpleXSRFCheck ¶
func NewSimpleXSRFCheck() *SimpleXSRFCheck
NewSimpleXSRFCheck creates a new instance
func (SimpleXSRFCheck) CheckAndClearToken ¶
CheckAndClearToken returns true if the given token matches for the given ip. If no entry was found for the ip, false is returned. At the end the ip entry is removed from the internal map.
Click to show internal directories.
Click to hide internal directories.