Make sure we check access token expiration (#15207)
* Make sure we check access token expiration * Use correct access token websocket
This commit is contained in:
parent
2205090795
commit
39971ee919
5 changed files with 74 additions and 11 deletions
|
@ -324,8 +324,9 @@ class ActiveConnection:
|
|||
request, msg['api_password'])
|
||||
|
||||
elif 'access_token' in msg:
|
||||
authenticated = \
|
||||
msg['access_token'] in self.hass.auth.access_tokens
|
||||
token = self.hass.auth.async_get_access_token(
|
||||
msg['access_token'])
|
||||
authenticated = token is not None
|
||||
|
||||
if not authenticated:
|
||||
self.debug("Invalid password")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue