示例#1
0
func logout(s session.Store, w http.ResponseWriter, r *http.Request) {
	next := extractPath(r.URL.Query().Get(keyNextPage))
	s.Delete(keyToken)
	http.Redirect(w, r, next, codeRedirect)
}
示例#2
0
func logout(ctx *macaron.Context, s session.Store) {
	next := extractPath(ctx.Query(KEY_NEXT_PAGE))
	s.Delete(KEY_TOKEN)
	ctx.Redirect(next)
}
示例#3
0
文件: user.go 项目: trigrass2/tech_oa
func (u *User) Logout(sess session.Store) {
	sess.Delete("uid")
}