Compare commits

...

4 Commits

Author SHA1 Message Date
Paulus Schoutsen
70a8cac19d Merge pull request #19897 from home-assistant/rc
0.85.0
2019-01-09 16:51:11 -08:00
Paulus Schoutsen
7641658e38 Bumped version to 0.85.0 2019-01-09 15:13:29 -08:00
Florian Ludwig
8cf595dd3e assign user to websocket connection when using legacy_api_password (#19797) 2019-01-09 15:13:13 -08:00
Paulus Schoutsen
f17d6c0593 Updated frontend to 20190109.0 2019-01-09 15:12:52 -08:00
6 changed files with 9 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ from homeassistant.core import callback
from homeassistant.helpers.translation import async_get_translations
from homeassistant.loader import bind_hass
REQUIREMENTS = ['home-assistant-frontend==20181219.0']
REQUIREMENTS = ['home-assistant-frontend==20190109.0']
DOMAIN = 'frontend'
DEPENDENCIES = ['api', 'websocket_api', 'http', 'system_log',

View File

@@ -6,6 +6,7 @@ from homeassistant.const import __version__
from homeassistant.components.http.auth import validate_password
from homeassistant.components.http.ban import process_wrong_login, \
process_success_login
from homeassistant.auth.providers import legacy_api_password
from .connection import ActiveConnection
from .error import Disconnect
@@ -81,7 +82,8 @@ class AuthPhase:
elif self._hass.auth.support_legacy and 'api_password' in msg:
self._logger.debug("Received api_password")
if validate_password(self._request, msg['api_password']):
return await self._async_finish_auth(None, None)
user = await legacy_api_password.async_get_user(self._hass)
return await self._async_finish_auth(user, None)
self._send_message(auth_invalid_message(
'Invalid access token or password'))

View File

@@ -2,7 +2,7 @@
"""Constants used by Home Assistant components."""
MAJOR_VERSION = 0
MINOR_VERSION = 85
PATCH_VERSION = '0b1'
PATCH_VERSION = '0'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 5, 3)

View File

@@ -511,7 +511,7 @@ hole==0.3.0
holidays==0.9.8
# homeassistant.components.frontend
home-assistant-frontend==20181219.0
home-assistant-frontend==20190109.0
# homeassistant.components.zwave
homeassistant-pyozw==0.1.2

View File

@@ -104,7 +104,7 @@ hdate==0.7.5
holidays==0.9.8
# homeassistant.components.frontend
home-assistant-frontend==20181219.0
home-assistant-frontend==20190109.0
# homeassistant.components.homematicip_cloud
homematicip==0.9.8

View File

@@ -132,7 +132,8 @@ async def test_auth_active_with_password_not_allow(hass, aiohttp_client):
assert auth_msg['type'] == TYPE_AUTH_INVALID
async def test_auth_legacy_support_with_password(hass, aiohttp_client):
async def test_auth_legacy_support_with_password(hass, aiohttp_client,
legacy_auth):
"""Test authenticating with a token."""
assert await async_setup_component(hass, 'websocket_api', {
'http': {