CodeSampleX

Beispiel

Enforce custom validation and require expiration checks during jwt/v5 token parsing

sha256:52c730ef7ed1a1b5deccabaff9420cd697d56b8a6b9a16484e33cfd280773b60

PUBLISHED L3_CONTRACT_PASS MIT-0

Fall

Ziel
Enforce custom validation and require expiration checks during jwt/v5 token parsing HOW
Pakete
github.com/golang-jwt/jwt/v5 v5.3.1
Umgebung
go
Erstellt
2026-08-17T01:27:53Z

Häufige Annahme

Defining a Valid() error method on a custom claims struct in github.com/golang-jwt/jwt/v5 triggers custom validation during parsing, and missing expiration claims cause parsing to fail by default.

So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.

Contract

Dateien

Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief

Ursprungs-Seeder

csx-seed

Verifizierungsbelege