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
Copy file name to clipboardExpand all lines: README.md
+3
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,9 @@ func main() {
108
108
109
109
// TokenHeadName is a string in the header. Default value is "Bearer"
110
110
TokenHeadName: "Bearer",
111
+
112
+
// TimeFunc provides the current time. You can override it to use another time value. This is useful for testing or if your server uses a different time zone than your tokens.
Copy file name to clipboardExpand all lines: auth_jwt.go
+13-6
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,9 @@ type GinJWTMiddleware struct {
70
70
71
71
// TokenHeadName is a string in the header. Default value is "Bearer"
72
72
TokenHeadNamestring
73
+
74
+
// TimeFunc provides the current time. You can override it to use another time value. This is useful for testing or if your server uses a different time zone than your tokens.
Copy file name to clipboardExpand all lines: example/server.go
+3
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,9 @@ func main() {
64
64
65
65
// TokenHeadName is a string in the header. Default value is "Bearer"
66
66
TokenHeadName: "Bearer",
67
+
68
+
// TimeFunc provides the current time. You can override it to use another time value. This is useful for testing or if your server uses a different time zone than your tokens.
0 commit comments