"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "staging/src/k8s.io/client-go/plugin/pkg/client/auth/azure/azure.go" between
kubernetes-1.15.9.tar.gz and kubernetes-1.15.10.tar.gz

About: Kubernetes is a platform for automating deployment, scaling, and operations of application containers across clusters of hosts (written in "Go"). 1.15.x series.

azure.go  (kubernetes-1.15.9):azure.go  (kubernetes-1.15.10)
skipping to change at line 290 skipping to change at line 290
ts.cfg = newCfg ts.cfg = newCfg
return nil return nil
} }
func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) { func (ts *azureTokenSource) refreshToken(token *azureToken) (*azureToken, error) {
env, err := azure.EnvironmentFromName(token.environment) env, err := azure.EnvironmentFromName(token.environment)
if err != nil { if err != nil {
return nil, err return nil, err
} }
oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(env.ActiveDirectory Endpoint, token.tenantID, nil) oauthConfig, err := adal.NewOAuthConfig(env.ActiveDirectoryEndpoint, toke n.tenantID)
if err != nil { if err != nil {
return nil, fmt.Errorf("building the OAuth configuration for toke n refresh: %v", err) return nil, fmt.Errorf("building the OAuth configuration for toke n refresh: %v", err)
} }
callback := func(t adal.Token) error { callback := func(t adal.Token) error {
return nil return nil
} }
spt, err := adal.NewServicePrincipalTokenFromManualToken( spt, err := adal.NewServicePrincipalTokenFromManualToken(
*oauthConfig, *oauthConfig,
token.clientID, token.clientID,
skipping to change at line 347 skipping to change at line 347
} }
return &azureTokenSourceDeviceCode{ return &azureTokenSourceDeviceCode{
environment: environment, environment: environment,
clientID: clientID, clientID: clientID,
tenantID: tenantID, tenantID: tenantID,
apiserverID: apiserverID, apiserverID: apiserverID,
}, nil }, nil
} }
func (ts *azureTokenSourceDeviceCode) Token() (*azureToken, error) { func (ts *azureTokenSourceDeviceCode) Token() (*azureToken, error) {
oauthConfig, err := adal.NewOAuthConfigWithAPIVersion(ts.environment.Acti veDirectoryEndpoint, ts.tenantID, nil) oauthConfig, err := adal.NewOAuthConfig(ts.environment.ActiveDirectoryEnd point, ts.tenantID)
if err != nil { if err != nil {
return nil, fmt.Errorf("building the OAuth configuration for devi ce code authentication: %v", err) return nil, fmt.Errorf("building the OAuth configuration for devi ce code authentication: %v", err)
} }
client := &autorest.Client{} client := &autorest.Client{}
deviceCode, err := adal.InitiateDeviceAuth(client, *oauthConfig, ts.clien tID, ts.apiserverID) deviceCode, err := adal.InitiateDeviceAuth(client, *oauthConfig, ts.clien tID, ts.apiserverID)
if err != nil { if err != nil {
return nil, fmt.Errorf("initialing the device code authentication : %v", err) return nil, fmt.Errorf("initialing the device code authentication : %v", err)
} }
_, err = fmt.Fprintln(os.Stderr, *deviceCode.Message) _, err = fmt.Fprintln(os.Stderr, *deviceCode.Message)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)