Error handling on generate handler
This commit is contained in:
parent
61507766fe
commit
26313ee041
3 changed files with 77 additions and 58 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue