Closed djidrov closed 8 years ago
what do you mean by saying that WWW-Authenticate header does not exist?
response.Headers.Set(HttpResponseHeader.WwwAuthenticate, "Basic");
doesn't work under windows?
On windows does not work. With presented change does work.
Sent from my Windows Phone
From: Genemailto:notifications@github.com Sent: 10/12/2015 3:09 To: genielabs/HomeGeniemailto:HomeGenie@noreply.github.com Cc: djidrovmailto:djidrov@live.com Subject: Re: [HomeGenie] MIG.Gateways Windows authentication problem (#230)
what do you mean by saying that WWW-Authenticate header does not exist?
response.Headers.Set(HttpResponseHeader.WwwAuthenticate, "Basic");
doesn't work under windows?
Reply to this email directly or view it on GitHub: https://github.com/genielabs/HomeGenie/issues/230#issuecomment-147268545
Ok... I applied your fix, it will be available along next update.
Upgrading my HomeGenie instance I realized that when authentication is set up Gateway is frozen. This is the first time I look up into source of home genie and I found an error in MIG.Gateways WebServiceGateway.cs
the code change is bold, from line 576: { response.StatusCode = (int)HttpStatusCode.Unauthorized; //response.Headers.Set(HttpResponseHeader.WwwAuthenticate, "Basic"); response.AddHeader("WWW-Authenticate", "Basic"); } } else { response.StatusCode = (int)HttpStatusCode.Unauthorized; //response.Headers.Set(HttpResponseHeader.WwwAuthenticate, "Basic"); response.AddHeader("WWW-Authenticate", "Basic"); }
error was that WWW-Authenticate header does not exist.
I hope that this will be included in next version.