From 262bd1f32666215e2f37f0e4d4864b1fa40a986b Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Thu, 28 Dec 2017 16:17:40 -0800 Subject: [PATCH] Fix DC/OS login expiration time (#3625) --- plugins/inputs/dcos/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/dcos/client.go b/plugins/inputs/dcos/client.go index 71165e9fb..50d78482f 100644 --- a/plugins/inputs/dcos/client.go +++ b/plugins/inputs/dcos/client.go @@ -325,7 +325,7 @@ func (c *ClusterClient) createLoginToken(sa *ServiceAccount) (string, error) { UID: sa.AccountID, StandardClaims: jwt.StandardClaims{ // How long we have to login with this token - ExpiresAt: int64(5 * time.Minute / time.Second), + ExpiresAt: time.Now().Add(5 * time.Minute).Unix(), }, }) return token.SignedString(sa.PrivateKey)