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