We are building an app using PhoneGap + Sencha 2.x. The app will allow potentially multiple users to login and logout while the app is running. As part of the server API we've built, we assign a session id to the app. Pretty plain stuff.
In order to get the session id to our API for authentication, since PhoneGap does not handle cookies, we need to send extra parameters to our API. Thus far we've been doing this via a custom proxy writer we've developed. Now we want to transition to using Sencha Architect, which can't handle custom writers. How then can we update the model and store definitions with a new session id assigned by the server (when a new user logs in) so that future requests will send the correct session id?
I have one idea, but it would require us modifying our copy of the Sencha code. We could assign a function as a value within the extraParams object of the proxy. The code modification would be where Sencha comiles the extra parameters for the proxy. Adding a foreach loop that would check for callbacks to build dynamic values would be the solution. Is this overkill or does Sencha already offer a solution to meet our needs?