File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func (c RegisteredClaims) Valid() error {
56
56
// default value in Go, let's not fail the verification for them.
57
57
if ! c .VerifyExpiresAt (now , false ) {
58
58
delta := now .Sub (c .ExpiresAt .Time )
59
- vErr .Inner = fmt .Errorf ("%s by %v " , delta , ErrTokenExpired )
59
+ vErr .Inner = fmt .Errorf ("%s by %s " , ErrTokenExpired , delta )
60
60
vErr .Errors |= ValidationErrorExpired
61
61
}
62
62
@@ -149,7 +149,7 @@ func (c StandardClaims) Valid() error {
149
149
// default value in Go, let's not fail the verification for them.
150
150
if ! c .VerifyExpiresAt (now , false ) {
151
151
delta := time .Unix (now , 0 ).Sub (time .Unix (c .ExpiresAt , 0 ))
152
- vErr .Inner = fmt .Errorf ("%s by %v " , delta , ErrTokenExpired )
152
+ vErr .Inner = fmt .Errorf ("%s by %s " , ErrTokenExpired , delta )
153
153
vErr .Errors |= ValidationErrorExpired
154
154
}
155
155
You can’t perform that action at this time.
0 commit comments