mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fixed NTLM auth in SQL server #305
This commit is contained in:
parent
00df20e350
commit
51c72efb34
@ -22,7 +22,7 @@ function extractTediousColumns(columns, addDriverNativeColumn = false) {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function tediousConnect({ server, port, user, password, database, ssl, trustServerCertificate, windowsDomnain }) {
|
async function tediousConnect({ server, port, user, password, database, ssl, trustServerCertificate, windowsDomain }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const connectionOptions = {
|
const connectionOptions = {
|
||||||
encrypt: !!ssl,
|
encrypt: !!ssl,
|
||||||
@ -43,11 +43,11 @@ async function tediousConnect({ server, port, user, password, database, ssl, tru
|
|||||||
server,
|
server,
|
||||||
|
|
||||||
authentication: {
|
authentication: {
|
||||||
type: windowsDomnain ? 'ntlm' : 'default',
|
type: windowsDomain ? 'ntlm' : 'default',
|
||||||
options: {
|
options: {
|
||||||
userName: user,
|
userName: user,
|
||||||
password: password,
|
password: password,
|
||||||
...(windowsDomnain ? { domain: windowsDomnain } : {}),
|
...(windowsDomain ? { domain: windowsDomain } : {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user