Skip to content

Commit

Permalink
Added the ability to specify login domain as a config parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
cr0wst committed Apr 20, 2016
1 parent d5b7a56 commit cd4f00d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ Config file is a JSON-encoded object with the following fields (see ``/examples/
"debug": false, // is more verbose when set to true
"username": "foo", // account to be used when logIn is called (optional)
"password": "bar", // password to be used when logIn is called (optional)
"domain" : "auth.bar.net", // domain to be used when logIn is called (optional)
"userAgent": "Custom UA", // define custom bot's user agent
"concurrency": 5 // how many API requests can be run in parallel (defaults to 3)
}
Expand Down
1 change: 1 addition & 0 deletions examples/config-DIST.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"debug": false,
"username": "foo",
"password": "bar",
"domain" : "auth.bar.net",
"userAgent": "foo/bar.net",
"concurrency": 5
}
6 changes: 3 additions & 3 deletions lib/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ module.exports = (function() {
// use data from config
username = this.options.username;
password = this.options.password;
}

// setup the domain
var domain = this.options.domain;
// assign domain if applicable
var domain = this.options.domain || '';
}

this.log('Obtaining login token...');

Expand Down

0 comments on commit cd4f00d

Please sign in to comment.