No more opt-out auth (#18854)

* No more opt-out auth

* Fix var
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2018-12-02 16:32:53 +01:00
1 parent ae9e3d83d7
commit d1a621601d
42 files changed
+307 -473

No files matched your search

+3 -4
View File
@@ -200,14 +200,13 @@ class HomeAssistantHTTP:
if is_ban_enabled:
setup_bans(hass, app, login_threshold)
if hass.auth.active and hass.auth.support_legacy:
if hass.auth.support_legacy:
_LOGGER.warning(
"legacy_api_password support has been enabled. If you don't "
"require it, remove the 'api_password' from your http config.")
setup_auth(app, trusted_networks, hass.auth.active,
support_legacy=hass.auth.support_legacy,
api_password=api_password)
setup_auth(app, trusted_networks,
api_password if hass.auth.support_legacy else None)
setup_cors(app, cors_origins)