Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/marklogic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
* Copyright (c) 2015-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
'use strict';
const http = require('http');
Expand Down Expand Up @@ -716,6 +716,7 @@ function initClient(client, inputParams) {
if(inputParams.authType && inputParams.authType.toString().toLowerCase() === 'cloud' && !isSSL){
isSSL = true;
}

const keys = ['host', 'port', 'database', 'user', 'password', 'authType', 'token', 'basePath','apiKey','accessTokenDuration',
'enableGzippedResponses', 'oauthToken'];
if(isSSL) {
Expand All @@ -738,6 +739,9 @@ function initClient(client, inputParams) {
connectionParams.lookup = prefLookup;

const authType = connectionParams.authType.toUpperCase();
if (authType === 'BASIC' && !isSSL) {
console.warn('Authentication type is BASIC and SSL is not enabled. This may expose credentials.');
}
Comment on lines +742 to +744
Comment on lines +742 to +744
if ((authType === 'DIGEST' || authType === 'BASIC') &&
((connectionParams.user == null) || (connectionParams.password == null))) {
throw new Error('cannot create client without user or password for '+
Expand Down
Loading