From 0b934faf1042dde1b08cb2642be1bac3d51d9934 Mon Sep 17 00:00:00 2001 From: olivierpelet Date: Thu, 8 Oct 2020 12:09:31 +0200 Subject: [PATCH] Quick fix of SoapService auth --- lib/SoapService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/SoapService.ts b/lib/SoapService.ts index 4309206d..3d5e2d74 100644 --- a/lib/SoapService.ts +++ b/lib/SoapService.ts @@ -70,6 +70,10 @@ class SoapService { }; this.serviceInstance = soap.listen(this.webserver, this.serviceOptions); + if (this.config.Username) { + this.serviceInstance.authenticate = () => true; + } + this.serviceInstance.on('headers', (headers, methodName) => { // Use the '=>' notation so 'this' refers to the class we are in // ONVIF allows GetSystemDateAndTime to be sent with no authenticaton header