Pass hostname to auth token request
Related to T56381
This commit is contained in:
@@ -7,7 +7,7 @@ import urllib.parse
|
||||
|
||||
import requests
|
||||
|
||||
from . import timeouts, exceptions
|
||||
from . import timeouts, exceptions, sockutil
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -137,7 +137,10 @@ class BenchmarkClient:
|
||||
|
||||
self._start_http_server()
|
||||
|
||||
params = urllib.parse.urlencode({'auth_callback': self.auth_http_server.auth_callback_url})
|
||||
params = urllib.parse.urlencode({
|
||||
'auth_callback': self.auth_http_server.auth_callback_url,
|
||||
'hostname': sockutil.hostname(),
|
||||
})
|
||||
url = f"{self.url_generate_token}?{params}"
|
||||
|
||||
if not webbrowser.open_new_tab(url):
|
||||
|
@@ -56,3 +56,7 @@ def find_free_port(start_address):
|
||||
port_nr += 1
|
||||
|
||||
return hostname, port_nr
|
||||
|
||||
|
||||
def hostname() -> str:
|
||||
return socket.gethostname()
|
||||
|
Reference in New Issue
Block a user