샘플
Verify a JWT with golang-jwt v5 and tell an expired token apart from a forged one
sha256:b81445cb9097d69ddb4ec5db96e99cdac25b5cbebc29977426ca6bbd778260c9
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Verify a JWT with golang-jwt v5 and tell an expired token apart from a forged one MIGRATION
- 패키지
- github.com/golang-jwt/jwt/v5 5.3.0
- 환경
- go 1.26
- 생성일
- 2026-08-14T06:27:58Z
컨트랙트
- sign and verify a token with claims embedded in RegisteredClaims
- assert an expired token matches both ErrTokenExpired and ErrTokenInvalidClaims
- assert a wrong key is a signature error and not an expiry
- assert alg=none is refused without opting in
- assert issuer checking is a parser option
파일
- csx.json
- go.mod
- go.sum
- src/tokens.go
- test/main.go
오리진 시더
검증 영수증
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · golang@1 · 2026-08-14 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · golang@1 · 2026-08-14 · ed25519:7da3f610facce8bf