I'm connecting to a few APIs and using basic authentication like so:
this.jenkins = jenkinsapi.init('https://USERNAME:PASSWORD@this-is-a-jenkins.server.local:8080', {strictSSL: false});
I'm concerned about just having the user's password just sitting there in a variable or plain text. It is inside a 'private' method but if anybody is able to view the source on the server they would be able to view the username and password.
How can I make this more secure while still using http basic auth?