예제 #1
0
func userLoginSubmit(w http.ResponseWriter, r *http.Request) {
	user := new(User)
	user.fromRequest(r)
	if !user.passwordOk() {
		fmt.Fprintln(w, "bad password dude")
	}
	session.Get(w, r).Authenticate()
	route.Redirect(w, r, "meat.list")

}
예제 #2
0
func userLogout(w http.ResponseWriter, r *http.Request) {
	session.Get(w, r).Logout()
	route.Redirect(w, r, "user.login")

}