<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using identity manager, how to i get access to the token to use later in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47666#M4163</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an app that uses secure services.&amp;nbsp; I use the identity manager to login and it works great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Part of the site builds a toc that uses the rest legends via separate calls (i loop through all the this.map.getLayer(layerId).url and make an dojo.xhrGet to the /MapServer/legend?f=json&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but i need to append the token on it, which i never see.&amp;nbsp; How do I get access to it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If i used esri.request instead of dojo.xhrGet would it put the token on?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Nov 2011 19:52:56 GMT</pubDate>
    <dc:creator>JeffPace</dc:creator>
    <dc:date>2011-11-04T19:52:56Z</dc:date>
    <item>
      <title>Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47666#M4163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an app that uses secure services.&amp;nbsp; I use the identity manager to login and it works great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Part of the site builds a toc that uses the rest legends via separate calls (i loop through all the this.map.getLayer(layerId).url and make an dojo.xhrGet to the /MapServer/legend?f=json&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but i need to append the token on it, which i never see.&amp;nbsp; How do I get access to it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If i used esri.request instead of dojo.xhrGet would it put the token on?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Nov 2011 19:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47666#M4163</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2011-11-04T19:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47667#M4164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Identity Manager is a singleton class that is automatically instantiated into esri.id when you load the module into your application. When you sign in using the identity manager the credentials are stored in esri.id.credentials. So if you need access to the token you can do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
console.log(esri.id.credentials[0].token);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:50:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47667#M4164</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-10T21:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47668#M4165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kelly, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Thank you so much, this has worked perfectly for me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I load my layers, and if it hits a secure layer it prompts excellently.&amp;nbsp; My only problem is i do something after the layers load, and since it is all asynchronous, the delay of logging in is making me miss my event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do it onLayerAdd, it doesn't seem that this event is being fired after a layer is loaded that includes a challenge from the identity manager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there an onSuccessLogin type event that i can listen for to trigger my refresh (its for a TOC legend).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Nov 2011 00:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47668#M4165</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2011-11-06T00:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47669#M4166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There isn't - but we are looking at adding events to the IdentityManager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Is there an onSuccessLogin type event that i can listen for to trigger my refresh"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 16:48:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47669#M4166</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-11-07T16:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47670#M4167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;There isn't - but we are looking at adding events to the IdentityManager.&lt;BR /&gt;&lt;BR /&gt;"Is there an onSuccessLogin type event that i can listen for to trigger my refresh"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok thanks for the info, that would be great.&amp;nbsp; Basically I loop through a list of layers and use the map.addLayer method.&amp;nbsp; If one is secure, it prompts, but the others continue to load.&amp;nbsp; Its seems like, however, that after my credentials pass the onLayerAdd event has already passed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 17:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47670#M4167</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2011-11-07T17:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using identity manager, how to i get access to the token to use later</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47671#M4168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What about if you add the layers to the map using map.addLayers([array of layers to add]). Then you could listen for the 'onLayersAddResult' event which fires after all the layers have been added.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Nov 2011 17:23:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identity-manager-how-to-i-get-access-to-the/m-p/47671#M4168</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-11-07T17:23:55Z</dc:date>
    </item>
  </channel>
</rss>

