node: set JWT expiry to 60 seconds (#25416)
* node: set JWT expiry to 60 seconds * node: rename var
This commit is contained in:
1 parent
c02b0488fb
commit
f26b63089a
2 files changed
+6
-4
No files matched your search
@@ -356,11 +356,11 @@ func TestJWT(t *testing.T) {
|
||||
expFail := []func() string{
|
||||
// future
|
||||
func() string {
|
||||
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + 6}))
|
||||
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() + int64(jwtExpiryTimeout.Seconds()) + 1}))
|
||||
},
|
||||
// stale
|
||||
func() string {
|
||||
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() - 6}))
|
||||
return fmt.Sprintf("Bearer %v", issueToken(secret, nil, testClaim{"iat": time.Now().Unix() - int64(jwtExpiryTimeout.Seconds()) - 1}))
|
||||
},
|
||||
// wrong algo
|
||||
func() string {
|
||||
|
||||
Reference in new issue
Block a user