You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## IMPORTANT: Integration Testing with JWT Library
72
79
73
-
Ensure that your project includes at least one integration test to detect changes in major versions of the `golang-jwt/jwt` library early.
74
-
This is crucial because type assertions like `token := c.Get("user").(*jwt.Token)` may fail silently if the imported version of the JWT library (e.g., `import "github.com/golang-jwt/jwt/v5"`) differs from the version used internally by dependencies (e.g., echo-jwt may now use `v6`). Such discrepancies can lead to invalid casts, causing your handlers to panic or throw errors. Integration tests help safeguard against these version mismatches.
80
+
Ensure that your project includes at least one integration test to detect changes in major versions of the
81
+
`golang-jwt/jwt` library early.
82
+
This is crucial because type assertions like `token := c.Get("user").(*jwt.Token)` may fail silently if the imported
83
+
version of the JWT library (e.g., `import "github.com/golang-jwt/jwt/v5"`) differs from the version used internally by
84
+
dependencies (e.g., echo-jwt may now use `v6`). Such discrepancies can lead to invalid casts, causing your handlers to
85
+
panic or throw errors. Integration tests help safeguard against these version mismatches.
0 commit comments