Remove direct authentication via trusted networks or API password (#27656)

* Remove direct authentication via trusted networks and API password

* Fix tests
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-10-14 14:56:45 -07:00
1 parent 97478d1ef4
commit 3231e22ddf
33 files changed
+114 -423

No files matched your search

+6 -1
View File
@@ -72,7 +72,11 @@ import voluptuous_serialize
from homeassistant import data_entry_flow
from homeassistant.components.http import KEY_REAL_IP
from homeassistant.components.http.ban import process_wrong_login, log_invalid_auth
from homeassistant.components.http.ban import (
process_wrong_login,
process_success_login,
log_invalid_auth,
)
from homeassistant.components.http.data_validator import RequestDataValidator
from homeassistant.components.http.view import HomeAssistantView
from . import indieauth
@@ -185,6 +189,7 @@ class LoginFlowIndexView(HomeAssistantView):
return self.json_message("Handler does not support init", 400)
if result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY:
await process_success_login(request)
result.pop("data")
result["result"] = self._store_result(data["client_id"], result["result"])
return self.json(result)