robmarkcole / HASS-Machinebox-Facebox

Home Assistant face detection using Machinebox.io
https://www.home-assistant.io/components/image_processing.facebox/
MIT License
23 stars 6 forks source link

Add auth #4

Open robmarkcole opened 6 years ago

robmarkcole commented 6 years ago

Required if the user has setup auth on a public box

https://machinebox.io/docs/machine-box-apis#basic-authentication

robmarkcole commented 6 years ago

Add a 'health check' of the auth credentials on setup.

Then need to add tests for for request authentication and failure of authentication. Requires checking the logs, see https://docs.pytest.org/en/latest/logging.html and example at https://github.com/home-assistant/home-assistant/blob/d9cf8fcfe82105b53aa6b4ee58a0e9633a700ca3/tests/helpers/test_entity_platform.py#L211