Skip to content
Snippets Groups Projects
Commit 923ef599 authored by Dmitry Ivanov's avatar Dmitry Ivanov
Browse files

fix: Take `auth_type` into account in `console.connect`

NO_DOC=picodata internal patch
NO_CHANGELOG=picodata internal patch
NO_TEST=picodata internal patch
parent 79fef881
No related branches found
No related tags found
1 merge request!84fix: Take `auth_type` into account in `console.connect`
Pipeline #21639 passed
...@@ -850,6 +850,11 @@ local function connect(uri, opts) ...@@ -850,6 +850,11 @@ local function connect(uri, opts)
error('Usage: console.connect("[login:password@][host:]port")') error('Usage: console.connect("[login:password@][host:]port")')
end end
if opts.auth_type == nil and u.params ~= nil and
u.params.auth_type ~= nil then
opts.auth_type = u.params.auth_type[1]
end
-- We don't know if the remote end is binary or Lua console so we first try -- We don't know if the remote end is binary or Lua console so we first try
-- to connect to it as binary using net.box and fall back on Lua console if -- to connect to it as binary using net.box and fall back on Lua console if
-- it fails. -- it fails.
...@@ -857,6 +862,7 @@ local function connect(uri, opts) ...@@ -857,6 +862,7 @@ local function connect(uri, opts)
connect_timeout = opts.timeout, connect_timeout = opts.timeout,
user = u.login, user = u.login,
password = u.password, password = u.password,
auth_type = opts.auth_type,
}) })
if remote.state == 'error' then if remote.state == 'error' then
local err = remote.error local err = remote.error
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment