• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

golang-jwt / jwt / 26476297660
70%

Build:
DEFAULT BRANCH: main
Ran 26 May 2026 09:30PM UTC
Jobs 1
Files 23
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 May 2026 09:30PM UTC coverage: 70.251% (+0.08%) from 70.172%
26476297660

push

github

web-flow
mapclaims: stop treating exp=0 as a missing claim (#509)

* mapclaims: stop treating exp=0 as a missing claim

MapClaims.parseNumericDate short-circuited and returned nil whenever a
float64 value happened to be 0. That made the very-much-set exp claim
"exp": 0 invisible to verifyExpiresAt, so the token was treated as
valid instead of expired.

The json.Number branch doesn't have the same carve-out, so parsing the
exact same token via WithJSONNumber() correctly came back as expired.
Drop the special case so both branches agree and an exp of 0 means
"this token expired at the unix epoch", which is what the JWT spec
calls for.

Fixes #496.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>

* mapclaims: test that string exp comes back as ErrInvalidType

Pins down the corner case raised in review: empty-string exp must
surface as ErrInvalidType rather than slipping into the float64
branch and looking like a 0 (i.e. epoch) value.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>

---------

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>

980 of 1395 relevant lines covered (70.25%)

15.88 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26476297660.1 26 May 2026 09:30PM UTC 23
70.25
GitHub Action Run
Source Files on build 26476297660
  • Tree
  • List 23
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26476297660
  • e8e5b83c on github
  • Prev Build on main (#26476247294)
  • Next Build on main (#28704418757)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc