mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Hass.io Add-on panel support for Ingress (#23185)
* Hass.io Add-on panel support for Ingress * Revert part of discovery startup handling * Add type * Fix tests * Add tests * Fix lint * Fix lint on test
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
"""Implement the auth feature from Hass.io for Add-ons."""
|
||||
from ipaddress import ip_address
|
||||
import logging
|
||||
import os
|
||||
from ipaddress import ip_address
|
||||
|
||||
import voluptuous as vol
|
||||
from aiohttp import web
|
||||
from aiohttp.web_exceptions import HTTPForbidden, HTTPNotFound
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.components.http.const import KEY_REAL_IP
|
||||
from homeassistant.components.http.data_validator import RequestDataValidator
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from .const import ATTR_ADDON, ATTR_PASSWORD, ATTR_USERNAME
|
||||
|
||||
@@ -27,7 +28,7 @@ SCHEMA_API_AUTH = vol.Schema({
|
||||
|
||||
|
||||
@callback
|
||||
def async_setup_auth(hass):
|
||||
def async_setup_auth_view(hass: HomeAssistantType):
|
||||
"""Auth setup."""
|
||||
hassio_auth = HassIOAuth(hass)
|
||||
hass.http.register_view(hassio_auth)
|
||||
|
||||
Reference in New Issue
Block a user