<?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 Re: How to avoid identity manager in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387477#M35746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joel, &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;This method works for displaying layers, but will encounter errors for getting legend information because of the duplicate ?token=....?token=.... using the legend widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After two days of trials, I have solved this problem.&lt;/P&gt;&lt;P&gt;Please see at &lt;A href="https://yujianmin.wordpress.com/2015/03/05/bypass-identitymanager-popup-in-esri-arcgis-javascript-api/" title="https://yujianmin.wordpress.com/2015/03/05/bypass-identitymanager-popup-in-esri-arcgis-javascript-api/"&gt;Bypass IdentityManager Popup in ESRI ArcGIS JavaScript API | River on Bridge...&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Mar 2015 08:10:34 GMT</pubDate>
    <dc:creator>JianminYu</dc:creator>
    <dc:date>2015-03-05T08:10:34Z</dc:date>
    <item>
      <title>How to avoid identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387475#M35744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Currently I am building a customised login page for ArcGIS app using generateToken REST service. &lt;/P&gt;&lt;P&gt;This login can be done easily, and the response gives me correct token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to access secure layers in my app, but I will encounter the Identity Manager popup for another login process.&lt;/P&gt;&lt;P&gt;Is there any method to avoid this popup ? &lt;/P&gt;&lt;P&gt;Can I manually to trigger the IdentityManager for &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;authentication ? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2015 04:32:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387475#M35744</guid>
      <dc:creator>JianminYu</dc:creator>
      <dc:date>2015-03-04T04:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387476#M35745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can probably get around this by appending the token to the query string of your layer's URL.&amp;nbsp; For example, you may have something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var url = "&lt;A href="https://my-server.com/arcgis/rest/services/my-service/MapServer" rel="nofollow noopener noreferrer" target="_blank"&gt;https://my-server.com/arcgis/rest/services/my-service/MapServer&lt;/A&gt;";
var layer = new ArcGISDynamicMapServiceLayer(url);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead, append the token like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var url = "&lt;A href="https://my-server.com/arcgis/rest/services/my-service/MapServer?token" rel="nofollow noopener noreferrer" target="_blank"&gt;https://my-server.com/arcgis/rest/services/my-service/MapServer?token&lt;/A&gt;=" + token;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This if course assumes your token is stored in a variable called "token".&amp;nbsp; Tokens expire too, so once it does, you'll probably see the identity popup again, unless you write code to manually acquire a new token.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387476#M35745</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2021-12-11T17:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387477#M35746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joel, &lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;This method works for displaying layers, but will encounter errors for getting legend information because of the duplicate ?token=....?token=.... using the legend widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After two days of trials, I have solved this problem.&lt;/P&gt;&lt;P&gt;Please see at &lt;A href="https://yujianmin.wordpress.com/2015/03/05/bypass-identitymanager-popup-in-esri-arcgis-javascript-api/" title="https://yujianmin.wordpress.com/2015/03/05/bypass-identitymanager-popup-in-esri-arcgis-javascript-api/"&gt;Bypass IdentityManager Popup in ESRI ArcGIS JavaScript API | River on Bridge...&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 08:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387477#M35746</guid>
      <dc:creator>JianminYu</dc:creator>
      <dc:date>2015-03-05T08:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387478#M35747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very good...it's always good to see somebody devising their own solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding the Legend dijit, this is a bug in ESRI's code that I've encountered and fixed on my locally hosted copy of the API (currently v3.12).&amp;nbsp; For what it's worth, in case it helps anybody else, here are my records of what I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;esri\dijit\Legend.js - updated so token doesn't occur twice in query string&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;-updated second line of the _legendRequestServer function to:&lt;BR /&gt;&amp;nbsp; (c=a._getToken())&amp;amp;&amp;amp;(b+=((b.indexOf("?")==-1)?"?token\x3d"+c:((b.indexOf("token=")==-1)?"&amp;amp;token\x3d"+c:"")));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-original code was &lt;BR /&gt;(c=a._getToken())&amp;amp;&amp;amp;(b+="?token\x3d"+c);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-also updated similar line in _buildRow_Tools function:&lt;BR /&gt;(d=c._getToken())&amp;amp;&amp;amp;(g+=((g.indexOf("?")==-1)?"?token\x3d"+d:((g.indexOf("token=")==-1)?"&amp;amp;token\x3d"+d:"")))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-original code was (d=c._getToken())&amp;amp;&amp;amp;(g+="?token\x3d"+d)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; -Note - beware not to delete/overwrite the extra right parenthesis at the end of this line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Mar 2015 18:37:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387478#M35747</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2015-03-05T18:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid identity manager</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387479#M35748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also want to byPass Identity Manager PopUp. I implemented your code but still popup comes.&lt;BR /&gt;Have you written getCookieName('xyz') function to get UserID and token?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2019 13:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-avoid-identity-manager/m-p/387479#M35748</guid>
      <dc:creator>MayurPatel</dc:creator>
      <dc:date>2019-06-09T13:59:39Z</dc:date>
    </item>
  </channel>
</rss>

