Add trusted networks auth provider (#15812)

* Add context to login flow

* Add trusted networks auth provider

* source -> context
This commit is contained in:
Jason Hu authored and Paulus Schoutsen committed 2018-08-13 12:40:06 +02:00
1 parent 50daef9a52
commit da8f93dca2
6 files changed
+247 -12

No files matched your search

+4 -1
View File
@@ -344,7 +344,10 @@ class ActiveConnection:
if request[KEY_AUTHENTICATED]:
authenticated = True
else:
# always request auth when auth is active
# even request passed pre-authentication (trusted networks)
# or when using legacy api_password
if self.hass.auth.active or not authenticated:
self.debug("Request auth")
await self.wsock.send_json(auth_required_message())
msg = await wsock.receive_json()