From 5494d16ef184fab08f07d1c7fc421918ab18e0d8 Mon Sep 17 00:00:00 2001 From: Weinong Wang Date: Thu, 23 Jan 2020 14:21:33 -0800 Subject: [PATCH] Revert "It fixes a bug where AAD token obtained by kubectl is incompatible with on-behalf-of flow and oidc." This reverts commit d1480ab49d603d0a95e509b627252ee7af8559ae. Revert this commit due to incomplete migration path Kubernetes-commit: 71b2a4cdcc18694387961d119c6ab71772579918 --- plugin/pkg/client/auth/azure/azure.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/pkg/client/auth/azure/azure.go b/plugin/pkg/client/auth/azure/azure.go index 47db5eb3..e583100c 100644 --- a/plugin/pkg/client/auth/azure/azure.go +++ b/plugin/pkg/client/auth/azure/azure.go @@ -287,7 +287,7 @@ func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) return nil, err } - oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, token.tenantID, nil) + oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, token.tenantID) if err != nil { return nil, fmt.Errorf("building the OAuth configuration for token refresh: %v", err) } @@ -344,7 +344,7 @@ func newAzureTokenSourceDeviceCode(environment azure.Environment, clientID strin } func (ts *azureTokenSourceDeviceCode) Token() (*azureToken, error) { - oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(ts.environment.ActiveDirectoryEndpoint, ts.tenantID, nil) + oauthConfig, err := adal.NewOAuthConfig(ts.environment.ActiveDirectoryEndpoint, ts.tenantID) if err != nil { return nil, fmt.Errorf("building the OAuth configuration for device code authentication: %v", err) }