There are a couple of events on Ext.Ajax, where you can attach global listeners.
To prevent requests from being fired you can use beforerequest and return false in your listener:
Ext.Ajax.on({
'beforerequest': function() {
if (!loggedIn) {
return false; // prevents request
}
}
});
There's also requestcomplete and requestexception, where you could check for the HTTP status code (don't know which of the two a HTTP 419 would fire):
Ext.Ajax.on({
'requestcomplete': function(conn, response) {
if (response.status == 419) {
// redirection to login page
}
}
});
(documentation links are for 3.4.0, but all events should be available in 3.2.1 as well)
Edit: Documentation for ExtJS v3.2.1