<?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 Header / Custom Token to Http Requests in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/adding-header-custom-token-to-http-requests/m-p/292106#M7813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bottom Line: I need to get a custom (NOT and ArcGIS) token from the WAB app to my proxy server along with each &amp;nbsp;http call from the WAB app which accesses secure resources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;a WAB (for developers) app to call a .NET proxy server which, in turn, has my secret. &amp;nbsp;I have a custom security setup (not oauth or LDAP etc.). &amp;nbsp;I need to get the user's custom token (not an ArcGIS token) from the WAB in javascript to the proxy server. &amp;nbsp;Then I need to check it there (via my own custom scheme) and only allow the request to proceed is the token is valid. &amp;nbsp;I'm not that familiar with the WAB project structure so I'm quite confused on even where to start. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would really like to do is add a custom "Authorization" http header to every call that flows through&amp;nbsp;esriRequest (which looks like the key function that does most of the getting of things.) &amp;nbsp;But I don't really&amp;nbsp;see how I can do that. &amp;nbsp;I suppose that I can hijack something else to get my token to the server... but not really sure where to start. &amp;nbsp;Or maybe there is a totally different way to tackle this problem. &amp;nbsp;But I cannot have the user directly sign on to ArcGIS or use AD or use OAuth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option might be to somehow make a call to the proxy server at startup and add an http only cookie with the token. &amp;nbsp;Not ideal but it might work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2017 17:27:48 GMT</pubDate>
    <dc:creator>ChristopherMoyes</dc:creator>
    <dc:date>2017-05-05T17:27:48Z</dc:date>
    <item>
      <title>Adding Header / Custom Token to Http Requests</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/adding-header-custom-token-to-http-requests/m-p/292106#M7813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bottom Line: I need to get a custom (NOT and ArcGIS) token from the WAB app to my proxy server along with each &amp;nbsp;http call from the WAB app which accesses secure resources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;a WAB (for developers) app to call a .NET proxy server which, in turn, has my secret. &amp;nbsp;I have a custom security setup (not oauth or LDAP etc.). &amp;nbsp;I need to get the user's custom token (not an ArcGIS token) from the WAB in javascript to the proxy server. &amp;nbsp;Then I need to check it there (via my own custom scheme) and only allow the request to proceed is the token is valid. &amp;nbsp;I'm not that familiar with the WAB project structure so I'm quite confused on even where to start. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would really like to do is add a custom "Authorization" http header to every call that flows through&amp;nbsp;esriRequest (which looks like the key function that does most of the getting of things.) &amp;nbsp;But I don't really&amp;nbsp;see how I can do that. &amp;nbsp;I suppose that I can hijack something else to get my token to the server... but not really sure where to start. &amp;nbsp;Or maybe there is a totally different way to tackle this problem. &amp;nbsp;But I cannot have the user directly sign on to ArcGIS or use AD or use OAuth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One option might be to somehow make a call to the proxy server at startup and add an http only cookie with the token. &amp;nbsp;Not ideal but it might work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 17:27:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/adding-header-custom-token-to-http-requests/m-p/292106#M7813</guid>
      <dc:creator>ChristopherMoyes</dc:creator>
      <dc:date>2017-05-05T17:27:48Z</dc:date>
    </item>
  </channel>
</rss>

