func endSession(s *sessions.Session, w http.ResponseWriter, r *http.Request) { s.Options = &sessions.Options{MaxAge: -1} s.Save(r, w) }
//ExtendExpiration pushes out the expiration of the session cookie to a further time //this is done to keep a user logged in automatically if they use the app frequently func ExtendExpiration(session *sessions.Session, w http.ResponseWriter, r *http.Request) { session.Options = options session.Save(r, w) return }
func deleteSession(session *sessions.Session, w http.ResponseWriter, r *http.Request) { session.Options = &sessions.Options{MaxAge: -1} session.Save(r, w) }