Log error after failed token validation
This commit is contained in:
parent
12d51559bf
commit
88ba105b70
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue