I am developing an app that uses ArcGIS iOS SDK.
My requirement is that I want to pass a session token (Received from my backend along with Login response) to each and every service call the SDK makes. As we know the SDK exposed API & usually accepts URL as a parameter. If i supply the URL of the map service, it would fetch the map info like images, etc & loads it on my view. This token is used by my backend team to authorize the user & respond the relevant map information from GIS server.
I know about AGSCredential object that is used to access secure GIS servers. My requirement is not only connecting to a secured GIS server but also get data based on current user. My app has 5 kinds of users who access the same GIS but should not be able to access complete data. To achieve this the Backend team has introduced a proxy layer, where the iOS SDK should talk to it. The proxy layer responds with appropriate data based on token that the client sends along with every request. The SDK requests should have a header with the token.
I wanted to know if this possible and, if yes, how can I accomplish it?
The web developers who use the ARCGIS SDK for .Net managed it by writing a proxy between the SDK and service layer on client. They are suggesting me to also do a similar thing but I doubt if that is possible in iOS.
Perhaps someone came across a similar scenario where you need to proxy the service calls made by a library integrated in an iOS application. I am sure we can add a parameter or header if the service request is written by me, but I want to proxy the calls happening from my SDK (ArcGIS iOS).