Deprecate http.api_password (#21884)
* Deprecated http.api_password * Deprecated ApiConfig.api_password GitHub Drafted PR would trigger CI after changed it to normal PR. I have to commit a comment change to trigger it * Trigger CI * Adjust if- elif chain in auth middleware
This commit is contained in:
parent
7ec7e51f70
commit
fe1840f901
27 changed files with 304 additions and 324 deletions
|
@ -822,7 +822,7 @@ async def test_auth_provider_config(hass):
|
|||
'time_zone': 'GMT',
|
||||
CONF_AUTH_PROVIDERS: [
|
||||
{'type': 'homeassistant'},
|
||||
{'type': 'legacy_api_password'},
|
||||
{'type': 'legacy_api_password', 'api_password': 'some-pass'},
|
||||
],
|
||||
CONF_AUTH_MFA_MODULES: [
|
||||
{'type': 'totp'},
|
||||
|
@ -873,11 +873,12 @@ async def test_auth_provider_config_default_api_password(hass):
|
|||
}
|
||||
if hasattr(hass, 'auth'):
|
||||
del hass.auth
|
||||
await config_util.async_process_ha_core_config(hass, core_config, True)
|
||||
await config_util.async_process_ha_core_config(hass, core_config, 'pass')
|
||||
|
||||
assert len(hass.auth.auth_providers) == 2
|
||||
assert hass.auth.auth_providers[0].type == 'homeassistant'
|
||||
assert hass.auth.auth_providers[1].type == 'legacy_api_password'
|
||||
assert hass.auth.auth_providers[1].api_password == 'pass'
|
||||
|
||||
|
||||
async def test_auth_provider_config_default_trusted_networks(hass):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue