Closed mbierman closed 1 year ago
What authentication mechanism does you http server use?
If it is digest authentication (my assumption) you need to specify sendImmediately
: false in the auth
object.
Quote from the request library:
Digest authentication is supported, but it only works with sendImmediately set to false; otherwise request will send basic authentication on the initial request, which will probably cause the request to fail.
I don't know the details of the http server. I don't run it and the API is not documented.
I don't see a WWW-Authenticate header
in the server's response which looks like this:
* Connected to api.meetflo.com (34.210.57.11) port 443 (#0)
* ALPN, offering http/1.1
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate: *.flosecurecloud.com
* Server certificate: Amazon
* Server certificate: Amazon Root CA 1
> POST /api/v1/users/auth HTTP/1.1
> Host: api.meetflo.com
> User-Agent: curl/7.71.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 100
>
} [100 bytes data]
* upload completely sent off: 100 out of 100 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Access-Control-Allow-Credentials: true
< Access-Control-Allow-Origin: *
< Content-Type: application/json; charset=utf-8
< Date: Sat, 18 Jul 2020 01:24:52 GMT
< ETag: W/"1d4-l4an7APDY3EGnVyxJkOy7+b2nLA"
< Server: nginx/1.17.8
< Server-Timing: intid;desc=93b0b804ca7695dd
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< X-Content-Type-Options: nosniff
< X-DNS-Prefetch-Control: off
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< x-request-id: 1c9b49a9-3ba6-4b7a-a661-c1a61cf95d83
< X-XSS-Protection: 1; mode=block
< Content-Length: 468
< Connection: keep-alive
<
{ [468 bytes data]
100 568 100 468 100 100 587 125 --:--:-- --:--:-- --:--:-- 711
* Connection #0 to host api.meetflo.com left intact
eG3M
Does that mean that this plugin can't support this auth?
Sorry for the long response time. I didn't really have a clue with your auth problems. Did you find any solution to this?
Describe the bug I'm having no luck with auth in a URL object.
To Reproduce Steps to reproduce the behavior:
The auth fails with
401
Version (output of
npm list -g homebridge homebridge-http-switch
)Configuration
Additional context