async def METHOD_NAME(self, connection: ASGIConnection[Any, Any, Any, Any]) -> AuthenticationResult:
    """Authenticate an incoming connection.
    Args:
        connection: An :class:`ASGIConnection <.connection.ASGIConnection>` instance.
    Raises:
        NotAuthorizedException: if session data is empty or user is not found.
    Returns:
        :class:`AuthenticationResult <.middleware.authentication.AuthenticationResult>`
    """
    if not connection.session or connection.session is Empty:
        # the assignment of 'Empty' forces the session middleware to clear session data.
        connection.scope["session"] = Empty
        raise NotAuthorizedException("no session data found")
    user = await self.retrieve_user_handler(connection.session, connection)
    if not user:
        connection.scope["session"] = Empty
        raise NotAuthorizedException("no user correlating to session found")
    return AuthenticationResult(user=user, auth=connection.session)