Move Verifier method to pkg-level func to accept *jwtauth.JwtAuth

This commit is contained in:
Peter Kieltyka 2017-07-06 18:09:09 -04:00
parent a5d0d75313
commit 6444fb9aef
5 changed files with 24 additions and 7 deletions

View file

@ -89,7 +89,7 @@ func router() http.Handler {
// Protected routes
r.Group(func(r chi.Router) {
// Seek, verify and validate JWT tokens
r.Use(tokenAuth.Verifier)
r.Use(jwtauth.Verifier(tokenAuth))
// Handle valid / invalid tokens. In this example, we use
// the provided authenticator middleware, but you can write your