コード例 #1
0
ファイル: main.go プロジェクト: joshheinrichs/cmpt436-project
func endSession(s *sessions.Session, w http.ResponseWriter, r *http.Request) {
	s.Options = &sessions.Options{MaxAge: -1}
	s.Save(r, w)
}
コード例 #2
0
//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
}
コード例 #3
0
ファイル: auth.go プロジェクト: falahhaprak/rter
func deleteSession(session *sessions.Session, w http.ResponseWriter, r *http.Request) {
	session.Options = &sessions.Options{MaxAge: -1}
	session.Save(r, w)
}