Foundation for users (#13968)

* Add initial user foundation to Home Assistant

* Address comments

* Address comments

* Allow non-ascii passwords

* One more utf-8 hmac compare digest

* Add new line
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-05-01 18:20:41 +02:00
1 parent b994c10d7f
commit cdd45e7878
22 files changed
+1774 -59

No files matched your search

+4 -3
View File
@@ -1,4 +1,6 @@
"""The tests for the Home Assistant HTTP component."""
import logging
from homeassistant.setup import async_setup_component
import homeassistant.components.http as http
@@ -76,14 +78,13 @@ async def test_api_no_base_url(hass):
async def test_not_log_password(hass, aiohttp_client, caplog):
"""Test access with password doesn't get logged."""
result = await async_setup_component(hass, 'api', {
assert await async_setup_component(hass, 'api', {
'http': {
http.CONF_API_PASSWORD: 'some-pass'
}
})
assert result
client = await aiohttp_client(hass.http.app)
logging.getLogger('aiohttp.access').setLevel(logging.INFO)
resp = await client.get('/api/', params={
'api_password': 'some-pass'