<?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: Authentication problem in Open Source Mapping Libraries Ques.</title>
    <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856856#M554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I figured out what is wrong but not how to fix it &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am calling the featurelayer even do I have a token present in the request, the endpoint still requires windows authentication. (when copying the link to a different browser then I’m prompted with a login dialog )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So how can I via ESRI-leaflet make a windows authentication in my calls to the endpoint?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Feb 2015 11:13:19 GMT</pubDate>
    <dc:creator>JacobSaugmann</dc:creator>
    <dc:date>2015-02-24T11:13:19Z</dc:date>
    <item>
      <title>Authentication problem</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856855#M553</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Im using leaflet and Esri leaflet plugin, our ArcGIS server uses Windows Authentication.&lt;/P&gt;
&lt;P&gt;I my javascript i get a token from the server and passes the token to the featureLayer request, my problem is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the response from the server is Access denied but when i copy/paste the request URL in a different browser window the server returns features.&lt;/P&gt;
&lt;P&gt;What can be wrong?&lt;/P&gt;
&lt;P&gt;&lt;IMG style="max-width: 1200px; max-height: 900px;" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/65003_pastedImage_0.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;Copy paste URL to another browser window:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="max-width: 1200px; max-height: 900px;" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/65004_pastedImage_1.png" border="0" alt="" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Jacob&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 13:49:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856855#M553</guid>
      <dc:creator>JacobSaugmann</dc:creator>
      <dc:date>2023-08-28T13:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication problem</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856856#M554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I figured out what is wrong but not how to fix it &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am calling the featurelayer even do I have a token present in the request, the endpoint still requires windows authentication. (when copying the link to a different browser then I’m prompted with a login dialog )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So how can I via ESRI-leaflet make a windows authentication in my calls to the endpoint?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 11:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856856#M554</guid>
      <dc:creator>JacobSaugmann</dc:creator>
      <dc:date>2015-02-24T11:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication problem</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856857#M555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you mind showing with your code snippet, how you are making the calls right now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how the Authentications are done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/authentication/index.html" title="https://developers.arcgis.com/authentication/index.html"&gt;ArcGIS Online Authentication | ArcGIS for Developers&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 12:18:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856857#M555</guid>
      <dc:creator>SachinKanaujia</dc:creator>
      <dc:date>2015-02-24T12:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication problem</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856858#M556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sachin&lt;/P&gt;&lt;P&gt;Yes the code looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt; L.esri.get("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myserver/webadapter/tokens/generateToken" rel="nofollow noopener noreferrer" target="_blank"&gt;http://myserver/webadapter/tokens/generateToken&lt;/A&gt;&lt;SPAN&gt;", {&lt;/SPAN&gt;
username: "username",
password: "password,
f:"json",
expiration: 86400,
client: "requestip",
referer: window.location.origin
}, function (error, response) {
token = response.token;
if (token) {
&amp;nbsp;&amp;nbsp; LoadAgsLayers();
} else {
&amp;nbsp;&amp;nbsp; console.log("Ingen token blev hentet");
}
});
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this code returns a token&lt;/P&gt;&lt;P&gt;Then i try to get the layer with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;var lukkeKort = L.esri.featureLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myserver/webadapter/rest/services/Varme/varme1/MapServer/27" rel="nofollow noopener noreferrer" target="_blank"&gt;http://myserver/webadapter/rest/services/Varme/varme1/MapServer/27&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;
{
token: token,
useCors: true
});

lukkeKort.addTo(map);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code passes a link with the token, but gets&amp;nbsp; "access denied,"&lt;/P&gt;&lt;P&gt;We created another webadaptor using basic authentication, now i need to add authentication informations in the header before the request is made, but i can't figure out how to setRequestHeader on the request.&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/65380_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;When i copy paste the link to a different browser and login, then the service returns features.&lt;BR /&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/65381_pastedImage_4.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-3" src="https://community.esri.com/legacyfs/online/65383_pastedImage_6.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:35:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856858#M556</guid>
      <dc:creator>JacobSaugmann</dc:creator>
      <dc:date>2021-12-12T10:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Authentication problem</title>
      <link>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856859#M557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to show it works when the basic authentication header is added&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/65388_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 08:33:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/open-source-mapping-libraries-ques/authentication-problem/m-p/856859#M557</guid>
      <dc:creator>JacobSaugmann</dc:creator>
      <dc:date>2015-02-25T08:33:45Z</dc:date>
    </item>
  </channel>
</rss>

