Skip to content

Commit 0d7ff40

Browse files
committed
debug: log invalid jwt tokens
1 parent 5ed4531 commit 0d7ff40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jwt/jwt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ type Claims struct {
2020
func IssuedAt(token string) (time.Time, error) {
2121
parts := strings.Split(token, ".")
2222
if len(parts) != 3 {
23-
return time.Time{}, fmt.Errorf("%w: invalid count of parts (expect 3, got %d)",
24-
errInvalidJwt, len(parts),
23+
return time.Time{}, fmt.Errorf("%w: invalid count of parts (expect 3, got %d): %s",
24+
errInvalidJwt, len(parts), token,
2525
)
2626
}
2727

0 commit comments

Comments
 (0)