node: set JWT expiry to 60 seconds (#25416)
* node: set JWT expiry to 60 seconds * node: rename var
This commit is contained in:
@@ -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