mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-21 16:16:31 +00:00
Remove old authentication (#1635)
This commit is contained in:
parent
cc56944d75
commit
2364e1e652
@ -123,21 +123,11 @@ class APIProxy(CoreSysAttributes):
|
|||||||
_LOGGER.error("Got unexpected response from HA WebSocket: %s", data)
|
_LOGGER.error("Got unexpected response from HA WebSocket: %s", data)
|
||||||
raise APIError()
|
raise APIError()
|
||||||
|
|
||||||
if self.sys_homeassistant.refresh_token:
|
# Auth session
|
||||||
await self.sys_homeassistant.ensure_access_token()
|
await self.sys_homeassistant.ensure_access_token()
|
||||||
await client.send_json(
|
await client.send_json(
|
||||||
{
|
{"type": "auth", "access_token": self.sys_homeassistant.access_token}
|
||||||
"type": "auth",
|
)
|
||||||
"access_token": self.sys_homeassistant.access_token,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
await client.send_json(
|
|
||||||
{
|
|
||||||
"type": "auth",
|
|
||||||
"api_password": self.sys_homeassistant.api_password,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
data = await client.receive_json()
|
data = await client.receive_json()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user