codetwice / homebridge-http-securitysystem

Homebridge plugin that creates a SecuritySystem device which uses configurable HTTP calls to set and get its state.
BSD 2-Clause "Simplified" License
29 stars 17 forks source link

Basic HTTP authentication (Fibaro HC2) #2

Closed 10der closed 7 years ago

10der commented 8 years ago

please add to support Fibaro HC2 with Basic HTTP authentication

headers: { 'Authorization': 'Basic ' + new Buffer(username + ':' + passw).toString('base64') } see also: https://dzone.com/articles/nodejs-call-https-basic

codetwice commented 7 years ago

Hey, thank you, I added it to the code, it's already on the master branch. When auth.username and auth.password are specified in the config, the plugin not only sends them inside the Auth header of the request but also in form of such an Authorization header.