mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-27 07:28:14 +00:00
Merge pull request #87507 from weinong/revert-86412
Revert "It fixes a bug where AAD token obtained by kubectl is incompa… Kubernetes-commit: bbc035a66cacc345dd54676e6c4e1f0389dbcb5a
This commit is contained in:
commit
7f990bd4b1
@ -287,7 +287,7 @@ func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error)
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectoryEndpoint, token.tenantID, nil)
|
oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, token.tenantID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("building the OAuth configuration for token refresh: %v", err)
|
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) {
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("building the OAuth configuration for device code authentication: %v", err)
|
return nil, fmt.Errorf("building the OAuth configuration for device code authentication: %v", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user