From 109e14c8802efd791bbdb152f9c6c05cd6c61ddb Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Wed, 15 May 2019 21:42:56 -0700 Subject: [PATCH] Update Azure config. --- kubernetes/config/azure.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kubernetes/config/azure.go b/kubernetes/config/azure.go index 9b44092..8d1384b 100644 --- a/kubernetes/config/azure.go +++ b/kubernetes/config/azure.go @@ -1,6 +1,7 @@ package config import ( + "encoding/json" "fmt" "log" "strconv" @@ -60,8 +61,8 @@ func (l *KubeConfigLoader) refreshAzureToken() error { token := adal.Token{ AccessToken: l.user.AuthProvider.Config["access-token"], RefreshToken: l.user.AuthProvider.Config["refresh-token"], - ExpiresIn: l.user.AuthProvider.Config["expires-in"], - ExpiresOn: l.user.AuthProvider.Config["expires-in"], + ExpiresIn: json.Number(l.user.AuthProvider.Config["expires-in"]), + ExpiresOn: json.Number(l.user.AuthProvider.Config["expires-in"]), } sptToken, err := adal.NewServicePrincipalTokenFromManualToken(*config, clientID, resource, token) if err := sptToken.Refresh(); err != nil {