Hi Aaron,
Sounds like a very useful application!
I'm not very familiar with AIR's implementation of HTTP requests, so I can't provide any specific help there. However, I've done something similar in the past with cURL (a commandline utility for fetching remote data, ie. webpages and the like).
Additionally, I'm not 100% on the implementation of the anti-XSRF and how it behaves towards requests made via AIR. But this is what I suggest:
1) alter you application so that after authentication is made you can recall any information about the first served page.
Once you authenticate with this Tweak Setting turned on, all authenticated page access is served with a pseudo relative URL. That is, URL rewriting is taking place and a check is made on the backend. Your application will need to be aware of the URL of the server page. ex:
you tell AIR to log into
Code:
http://mywhmdomain.com:2086/
you'll be returned something like this:
Code:
http://10.1.5.150:2086/cpsess1995009803/?post_login=62080613500004
AIR needs the cpsessXXXXXXX part. Say you what to navigate to the Tweak Settings page:
Code:
http://mywhmdomain.com:2086/cpsess1995009803/scripts2/tweaksettings
The cpsessXXXXXXXXX is what we're after. This is your 'token' you must prepend that to any page request for the rest of this authenticated session.
This works the same for cPanel and WHM interfaces.
2) You made need to also keep track of the referring page too. When an http request is made, usually the request header has the previous page's URL (if you're clicking through or submitting information, not direct URL query). Some security mechanizes will check this. I'm not sure about cPanel's anti-XSRF. If so, then your AIR's HTTP request header will need to contain this information too.
Hope this helps point you in the right direction.
-Dave