Skip to content

Commit

Permalink
Update security.md (#662)
Browse files Browse the repository at this point in the history
Options is an array that contains key username and password

Co-authored-by: Adrian Mróź <adrianmroz@users.noreply.github.com>
  • Loading branch information
akhilsuri02 and adrianmroz authored Nov 9, 2020
1 parent 2bec8b3 commit f4365e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ exports.version = 1;
// options - is an object with the following keys:
// * cluster: Cluster - the cluster object
exports.druidRequestDecoratorFactory = function (logger, params) {
var options = params.options;
var myUsername = options.myUsername; // pretend we store the username and password
var myPassword = options.myPassword; // in the config
var options = params.options; // The options will be an array and hence access values with index position
var myUsername = options[0].myUsername; // pretend we store the username and password
var myPassword = options[0].myPassword; // in the config

if (!myUsername) throw new Error('must have username');
if (!myPassword) throw new Error('must have password');
Expand Down

0 comments on commit f4365e2

Please sign in to comment.