|
@@ -57,12 +57,16 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if response.IdentityToken != "" {
|
|
|
|
+ authConfig.Password = ""
|
|
|
|
+ authConfig.IdentityToken = response.IdentityToken
|
|
|
|
+ }
|
|
if err := storeCredentials(cli.configFile, authConfig); err != nil {
|
|
if err := storeCredentials(cli.configFile, authConfig); err != nil {
|
|
return fmt.Errorf("Error saving credentials: %v", err)
|
|
return fmt.Errorf("Error saving credentials: %v", err)
|
|
}
|
|
}
|
|
|
|
|
|
if response.Status != "" {
|
|
if response.Status != "" {
|
|
- fmt.Fprintf(cli.out, "%s\n", response.Status)
|
|
|
|
|
|
+ fmt.Fprintln(cli.out, response.Status)
|
|
}
|
|
}
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
@@ -120,6 +124,7 @@ func (cli *DockerCli) configureAuth(flUser, flPassword, serverAddress string, is
|
|
authconfig.Username = flUser
|
|
authconfig.Username = flUser
|
|
authconfig.Password = flPassword
|
|
authconfig.Password = flPassword
|
|
authconfig.ServerAddress = serverAddress
|
|
authconfig.ServerAddress = serverAddress
|
|
|
|
+ authconfig.IdentityToken = ""
|
|
|
|
|
|
return authconfig, nil
|
|
return authconfig, nil
|
|
}
|
|
}
|