@funky To be able to use self-signed certificates it is possible to set an option as part of the https request (client side), i.e. rejectUnauthorized: false
. See also second answer on http://stackoverflow.com/questions/10888610/ignore-invalid-self-signed-ssl-certificate-in-node-js-with-https-request. Regarding username and password these shall not be set as part of the URL, but you need to add an authorization header to the http/https request as follows:
var req = https.request({
...
auth: username + ":" + password,
...