Add session management for user authentication
This commit is contained in:
parent
e235e3d8a8
commit
ab662bd4b8
3 changed files with 45 additions and 4 deletions
2
main.go
2
main.go
|
|
@ -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)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue