Some of this is just going to be a repeat from my pre-release post, but since this is the full release, I feel I should put it all here anyway.
Before I get too far into this, I will state this: this is a dual-numbered release. It is numbered 0.3 for my OSD600 course, but since this is the first release that is actually close to the original idea (0.1 and 0.2 were just working on DBus in XPCOM), it is officially numbered 0.1.
For those who are new to this blog, or just the idea of the NetworkManaher Automatic Web Authentication I've been working on (which I'm calling "nmAutoLogin" inside itself) , the idea is that several networks, such as colleges, workplaces, café hotspots, trains, airplanes, etc. require you to navigate to a webpage and login to there before you can access the internet, even outside of the browser. Having to do this manually can be a bit of a chore, or just an annoyance.
Would it not be nice if you could just have NetworkManager in Linux connect to a wireless network, then automatically have a browser like Firefox open this page and log in to it? That's what the idea here is: When NetworkManager connects to a wifi network that needs such a login to take place, a daemon will pick up on this connection, open Firefox if it's not open, navigate to the page, and log the user in, using Firefox's Password Manager to hold the username & password for this website.
The reasoning for using Firefox rather than one of several web browsing libraries available out there is relatively sound:
- Firefox has a Password Manager: Why would we want to store passwords in yet another place, when we can keep them centralized?
- Firefox is a GUI: If something goes wrong (wrong password, unable to connect, etc) the user should be able to see this, and be able to react to it
- Javascript Popup Windows: Some of these network websites will pop up a little window that runs some javascript over time to make sure the user is active, and that if they disocnnect, it will log them out. Why should we try to integrate a full Javascript engine into something else, when we already have a browser that can do it all?
The main problem with trying to get this to work, is that there is no way to control Firefox from outside of Firefox. The solution for this was to write an extension that includes an XPCOM component allowing it to listen to signals sent out on DBus, and then have the usual Javascript in an extension that would pick up on this, and react accordingly. At present, most of the code for this release is actually in this extension, even if the DBus work is more extensive in the Daemon.
The basic structure of how this entire thing works: