Using identity manager, how to i get access to the token to use later

Discussion created by jeff.pace on Nov 4, 2011
Latest reply on Nov 7, 2011 by khutchins-esristaff
I have an app that uses secure services.  I use the identity manager to login and it works great.

Part of the site builds a toc that uses the rest legends via separate calls (i loop through all the and make an dojo.xhrGet to the /MapServer/legend?f=json

but i need to append the token on it, which i never see.  How do I get access to it?

If i used esri.request instead of dojo.xhrGet would it put the token on?