From 55f35f291d30e3e7f5a5cd52f5386131dc97eeeb 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) (cherry picked from commit 005face7c0e263692d8d9a70b312be6acb307688) --- 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)