mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
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:
committed by
Paulus Schoutsen
parent
7ec7e51f70
commit
fe1840f901
@@ -168,11 +168,11 @@ class APIDiscoveryView(HomeAssistantView):
|
||||
def get(self, request):
|
||||
"""Get discovery information."""
|
||||
hass = request.app['hass']
|
||||
needs_auth = hass.config.api.api_password is not None
|
||||
return self.json({
|
||||
ATTR_BASE_URL: hass.config.api.base_url,
|
||||
ATTR_LOCATION_NAME: hass.config.location_name,
|
||||
ATTR_REQUIRES_API_PASSWORD: needs_auth,
|
||||
# always needs authentication
|
||||
ATTR_REQUIRES_API_PASSWORD: True,
|
||||
ATTR_VERSION: __version__,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user