Log error after failed token validation

This commit is contained in:
wpetit 2020-06-22 11:42:48 +02:00
parent 12d51559bf
commit 88ba105b70

View File

@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io/ioutil"
"log"
"net/http"
"strconv"
"strings"
@ -134,6 +135,7 @@ func JwtHandler(ac *Auth, next http.Handler) (http.HandlerFunc, error) {
token, err := jwt.ParseWithClaims(tok, &standardClaims{}, keyFunc)
if err != nil {
log.Printf("[ERR] %s", err)
next.ServeHTTP(w, r)
return
}