Hi Aaron,
Did this approach work for you further? I implemented following way but IdentityManager tries to refresh token periodically.
I have an enterprise application where I have 600+ screens. In that only 4-5 gis screens. Whenever I connect secure gis map service from gis screen then:
- Generate token from server side and pass it to client side
- Initialize credentials and serverInfos in IdentityManager.initialize() method.
- Start the task with lesser than shortLivedTokenValidity (available at http://<arcgisserver>/rest/info resource) and re-initialize identity manager with the new token.
- This works fine and loads the map.
- Once I leave the GIS screen then I need to stop the task that I initiated as it has no use.
- At this point there is an issue. IdentityManager is monitoring based for token expiry. Once it's expired then it tries to refresh the token. Since it doesn't find credentials (as password is not passed to client side), it opens up the popup.
- Let's say if I destroy the credentials while leaving (using esriId.destroyCredentials()) and revisit the GIS screen then also it opens up the popup because it has been initialized with esri.id.
Did you fall in the same situation? How could you resolve it? Wondering if I can destroy esri.id somehow while leaving the GIS screen. Tried to do esri.id = null but no success. Still the popup opens up when I revisit the screen.
jeff.pace / khutchins-esristaff / dblanchardesri-ca-esridist - any suggestions? I cannot work with proxy as I need to set credentials for each user.