Documentation ¶
Index ¶
Constants ¶
View Source
const MaxAge = 60 * 60 * 24 * 365 * 5
Variables ¶
This section is empty.
Functions ¶
func IsValidCSRF ¶
func SaveCaptcha ¶
Types ¶
type Data ¶
type Data struct { TimeoutAt time.Time `json:",omitempty"` CurrentUserID uint64 `json:",omitempty"` LastSeen time.Time `json:",omitempty"` LoggedIn bool `json:",omitempty"` Captcha string `json:",omitempty"` Csrf string `json:",omitempty"` LoginDest string `json:",omitempty"` Flash *flash.Flash `json:",omitempty"` EmailReport map[string]bool `json:",omitempty"` }
type SessionContext ¶
type SessionContext struct { Data Data // contains filtered or unexported fields }
func (*SessionContext) FailFlash ¶
func (s *SessionContext) FailFlash(m string) *SessionContext
func (*SessionContext) Save ¶
func (s *SessionContext) Save(ctx context.Context, w http.ResponseWriter)
func (*SessionContext) SuccessFlash ¶
func (s *SessionContext) SuccessFlash(m string) *SessionContext
func (*SessionContext) VerifyCaptchaSolution ¶
func (s *SessionContext) VerifyCaptchaSolution(r *http.Request) bool
Click to show internal directories.
Click to hide internal directories.