from .connection import ActiveConnection as ActiveConnection
from .error import Disconnect as Disconnect
from homeassistant.auth.models import RefreshToken as RefreshToken, User as User
from homeassistant.components.http.ban import process_success_login as process_success_login, process_wrong_login as process_wrong_login
from homeassistant.const import __version__ as __version__
from typing import Any

TYPE_AUTH: str
TYPE_AUTH_INVALID: str
TYPE_AUTH_OK: str
TYPE_AUTH_REQUIRED: str
AUTH_MESSAGE_SCHEMA: Any

def auth_ok_message(): ...
def auth_required_message(): ...
def auth_invalid_message(message: Any): ...

class AuthPhase:
    _hass: Any = ...
    _send_message: Any = ...
    _logger: Any = ...
    _request: Any = ...
    _authenticated: bool = ...
    _connection: Any = ...
    def __init__(self, logger: Any, hass: Any, send_message: Any, request: Any) -> None: ...
    async def async_handle(self, msg: Any): ...
    async def _async_finish_auth(self, user: User, refresh_token: RefreshToken) -> ActiveConnection: ...
