<?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 Adding a token to feature layer URL not hosted on an arcgis server in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-token-to-feature-layer-url-not-hosted-on/m-p/102572#M9398</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to add a Feature Layer to my application that sources data from a FeatureServer URL that is hosted internally, not on an ArcGIS server.&amp;nbsp; The URL requires authentication to access, either through a token parameter or an authorization header.&amp;nbsp; How do I have ArcGIS JS (4.8) add the token to the URL when creating the feature layer?&amp;nbsp; I have tried &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#initialize"&gt;IdentityManager.initialize&lt;/A&gt; and the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;token property&lt;/A&gt; on the FeatureLayer object with no luck.&amp;nbsp; Most information on how to authenticate requests is specifically for authenticating to an ArcGIS hosted resource, not something hosted elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other tool we're using is a Node Express server hosting data from a MarkLogic database server as Feature Layers, &lt;A href="https://github.com/koopjs/koop-provider-marklogic"&gt;koop-provider-marklogic&lt;/A&gt;.&amp;nbsp; Without authentication enabled everything works fine, but that's less than ideal for security reasons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2018 17:01:01 GMT</pubDate>
    <dc:creator>DanielBen</dc:creator>
    <dc:date>2018-11-30T17:01:01Z</dc:date>
    <item>
      <title>Adding a token to feature layer URL not hosted on an arcgis server</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-token-to-feature-layer-url-not-hosted-on/m-p/102572#M9398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to add a Feature Layer to my application that sources data from a FeatureServer URL that is hosted internally, not on an ArcGIS server.&amp;nbsp; The URL requires authentication to access, either through a token parameter or an authorization header.&amp;nbsp; How do I have ArcGIS JS (4.8) add the token to the URL when creating the feature layer?&amp;nbsp; I have tried &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html#initialize"&gt;IdentityManager.initialize&lt;/A&gt; and the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#token"&gt;token property&lt;/A&gt; on the FeatureLayer object with no luck.&amp;nbsp; Most information on how to authenticate requests is specifically for authenticating to an ArcGIS hosted resource, not something hosted elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other tool we're using is a Node Express server hosting data from a MarkLogic database server as Feature Layers, &lt;A href="https://github.com/koopjs/koop-provider-marklogic"&gt;koop-provider-marklogic&lt;/A&gt;.&amp;nbsp; Without authentication enabled everything works fine, but that's less than ideal for security reasons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2018 17:01:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-token-to-feature-layer-url-not-hosted-on/m-p/102572#M9398</guid>
      <dc:creator>DanielBen</dc:creator>
      <dc:date>2018-11-30T17:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a token to feature layer URL not hosted on an arcgis server</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-token-to-feature-layer-url-not-hosted-on/m-p/102573#M9399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/342387"&gt;Daniel Ben&lt;/A&gt;&amp;nbsp;I'm not 100% sure, but this sounds like a good use case for RequestInterceptors. This would allow you to add&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;a token parameter or an authorization header.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8; font-weight: 300;"&gt;esriConfig.request.interceptors:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request"&gt;config | API Reference | ArcGIS API for JavaScript 4.10&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2018 19:41:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/adding-a-token-to-feature-layer-url-not-hosted-on/m-p/102573#M9399</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2018-12-28T19:41:56Z</dc:date>
    </item>
  </channel>
</rss>

