mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fix auth for hass.io (#17318)
* Update test_auth.py * Update auth.py * Update test_auth.py
This commit is contained in:
@@ -4,8 +4,7 @@ from ipaddress import ip_address
|
||||
import os
|
||||
|
||||
from aiohttp import web
|
||||
from aiohttp.web_exceptions import (
|
||||
HTTPForbidden, HTTPNotFound, HTTPUnauthorized)
|
||||
from aiohttp.web_exceptions import HTTPForbidden, HTTPNotFound
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.core import callback
|
||||
@@ -72,4 +71,4 @@ class HassIOAuth(HomeAssistantView):
|
||||
try:
|
||||
await provider.async_validate_login(username, password)
|
||||
except HomeAssistantError:
|
||||
raise HTTPUnauthorized() from None
|
||||
raise HTTPForbidden() from None
|
||||
|
||||
Reference in New Issue
Block a user