Sending token(s) to Non-ArcGIS WMS services

Discussion created by jeremy.wiebe on Nov 1, 2012
Latest reply on Jan 14, 2013 by jonase
Hi all,

We are using the ArcGIS v3.2 Javascript API.  Most of our mapping is done by ArcGIS, but we have a swappable base layer that we allow the user to change (aerial and satellite imagery or topography).  We are doing this using an esri.layers.WMSLayer().

The service that is supplying this imagery is proxied through a mapproxy ( server.  Some of these proxied layers we have to pay for per-request and require a user token with each request.  

I've been looking at the IdentityManager and IdentityManagerBase classes but from what I've read they're only applicable if you are using a secured ArcGIS server. 

Does anyone have any ideas on how this might be done?   I've tried embedding the tokens in the url when creating the WMSLayer but those are stripped when the javascript API starts calling out to the service.  Well, to be clear, the token remains in the first call to our proxy page ( but is then gone when the API makes a direct call to the mapproxy service. 

The request to the proxy page looks like this (I've removed the actual IP):


Then the API goes directly to the proxied page:,6075910,-9862030.049733568,8548569