Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DS is the location of the core datastore DS = "core" + string(os.PathSeparator) + "session.ds" // CookieName is the name of the cookie where the freehold cookie will be CookieName = "freehold_session" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
ID string `json:"id,omitempty"`
Expires string `json:"expires,omitempty"`
CSRFToken string `json:"CSRFToken,omitempty"`
IPAddress string `json:"ipAddress,omitempty"`
Created string `json:"created,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
// contains filtered or unexported fields
}
Session is a freehold session, tracked by a cookie
func (*Session) HandleCSRF ¶
HandleCSRF tests if the CSRF token is present and valid
Click to show internal directories.
Click to hide internal directories.