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
|
@ -143,15 +143,13 @@ async def test_api_base_url_removes_trailing_slash(hass):
|
|||
async def test_not_log_password(hass, aiohttp_client, caplog, legacy_auth):
|
||||
"""Test access with password doesn't get logged."""
|
||||
assert await async_setup_component(hass, 'api', {
|
||||
'http': {
|
||||
http.CONF_API_PASSWORD: 'some-pass'
|
||||
}
|
||||
'http': {}
|
||||
})
|
||||
client = await aiohttp_client(hass.http.app)
|
||||
logging.getLogger('aiohttp.access').setLevel(logging.INFO)
|
||||
|
||||
resp = await client.get('/api/', params={
|
||||
'api_password': 'some-pass'
|
||||
'api_password': 'test-password'
|
||||
})
|
||||
|
||||
assert resp.status == 200
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue