Log error after failed token validation

This commit is contained in:
wpetit 2020-06-22 11:42:48 +02:00
parent 12d51559bf
commit 88ba105b70
1 changed files with 2 additions and 0 deletions

View File

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