Error handling on generate handler

This commit is contained in:
Matthew Dillon 2015-04-20 15:59:10 -08:00
parent 61507766fe
commit 26313ee041
3 changed files with 77 additions and 58 deletions

View file

@ -45,7 +45,7 @@ func main() {
panic(err)
}
protect := http.HandlerFunc(protectMe)
http.HandleFunc("/authenticate", j.GenerateToken)
http.Handle("/authenticate", j.GenerateToken())
http.Handle("/secure", j.Secure(protect, verifyClaimsFunc))
http.ListenAndServe(":8080", nil)
}