Skip to content

Commit

Permalink
Revert "It fixes a bug where AAD token obtained by kubectl is incompa…
Browse files Browse the repository at this point in the history
…tible with on-behalf-of flow and oidc."

This reverts commit d1480ab49d603d0a95e509b627252ee7af8559ae.

Revert this commit due to incomplete migration path

Kubernetes-commit: 769c982dc92c815d7ad82c4d97b8d80fdf1772c0
  • Loading branch information
weinong authored and k8s-publishing-bot committed Jan 23, 2020
1 parent 0cdd283 commit 5ee463b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/pkg/client/auth/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 5ee463b

Please sign in to comment.