Add session management for user authentication

This commit is contained in:
bronku 2025-03-21 23:13:14 +01:00
parent e235e3d8a8
commit ab662bd4b8
3 changed files with 45 additions and 4 deletions

View file

@ -25,6 +25,8 @@ func main() {
log.Fatal("can't open the databse", err)
}
a = auth.New()
http.HandleFunc("GET /order/", logger(a.Authenticate(h.form)))
http.HandleFunc("GET /", logger(a.Authenticate(h.index)))
http.HandleFunc("POST /", logger(a.Authenticate(h.addOrder)))