From af076e5342ee3b17ac7f68b33f1b48ab42157774 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Mon, 29 Oct 2018 08:03:22 +0000 Subject: [PATCH] upgrade azure sdk to support ultra ssd update Godeps.json update azure sdk for ultrassd support update bazel fix build failure Kubernetes-commit: d210b4bcf350308f51d8bffb7748b2cc3fb611c0 --- plugin/pkg/client/auth/azure/azure.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugin/pkg/client/auth/azure/azure.go b/plugin/pkg/client/auth/azure/azure.go index 60304b0f..9858963e 100644 --- a/plugin/pkg/client/auth/azure/azure.go +++ b/plugin/pkg/client/auth/azure/azure.go @@ -17,6 +17,7 @@ limitations under the License. package azure import ( + "encoding/json" "errors" "fmt" "net/http" @@ -243,9 +244,9 @@ func (ts *azureTokenSource) retrieveTokenFromCfg() (*azureToken, error) { token: adal.Token{ AccessToken: accessToken, RefreshToken: refreshToken, - ExpiresIn: expiresIn, - ExpiresOn: expiresOn, - NotBefore: expiresOn, + ExpiresIn: json.Number(expiresIn), + ExpiresOn: json.Number(expiresOn), + NotBefore: json.Number(expiresOn), Resource: fmt.Sprintf("spn:%s", apiserverID), Type: tokenType, }, @@ -262,8 +263,8 @@ func (ts *azureTokenSource) storeTokenInCfg(token *azureToken) error { newCfg[cfgClientID] = token.clientID newCfg[cfgTenantID] = token.tenantID newCfg[cfgApiserverID] = token.apiserverID - newCfg[cfgExpiresIn] = token.token.ExpiresIn - newCfg[cfgExpiresOn] = token.token.ExpiresOn + newCfg[cfgExpiresIn] = string(token.token.ExpiresIn) + newCfg[cfgExpiresOn] = string(token.token.ExpiresOn) err := ts.persister.Persist(newCfg) if err != nil {