<?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: GeoEvent input connector using token authentication in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1203218#M6321</link>
    <description>&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;Did you solve the issue with auth token authorization for input connector for geoevent?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2022 13:06:45 GMT</pubDate>
    <dc:creator>AlexLeonov</dc:creator>
    <dc:date>2022-08-16T13:06:45Z</dc:date>
    <item>
      <title>GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766129#M5202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to configure a JSON&amp;nbsp;poll connector using token.&amp;nbsp; First I need to get a token using POST request and then pass the token to the different url to get jSON data.&amp;nbsp; I think it is a&amp;nbsp;very typical process: get a token from token url and get json data using the token authentification. But it is unclear in Geoevent how to do.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea or sample?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 08:51:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766129#M5202</guid>
      <dc:creator>Hwa_SaupLee</dc:creator>
      <dc:date>2019-03-01T08:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766130#M5203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A bit more context would help - do you mean that you're polling a secured external website for JSON?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 18:58:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766130#M5203</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-03-01T18:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766131#M5204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Yes. It is polling json from external website.  First I need to get a token using post request. Second i need to pass the token to get json data using get request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get Outlook for Android&amp;lt;https://aka.ms/ghei36&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Mar 2019 04:38:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766131#M5204</guid>
      <dc:creator>Hwa_SaupLee</dc:creator>
      <dc:date>2019-03-02T04:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766132#M5205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not positive of an out-the-box solution, but conceptually you should be able to create a lightweight application that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Obtains the token&lt;/LI&gt;&lt;LI&gt;Sends a request to the website with the required token&lt;/LI&gt;&lt;LI&gt;Sends the response to GeoEvent&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, you'd use the 'Receive JSON on a REST Endpoint' input connector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2019 23:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766132#M5205</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2019-03-04T23:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766133#M5206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the exact same issue. I am trying to get data from the GPSGate REST service. &lt;BR /&gt;The use of this service requires authentication, and this is done using a token, which you have to get using a username and password.&amp;nbsp;&lt;BR /&gt;There is a service where you can get your token using a POST request sending username/password to the Token service and get a Token back and then use that token for authetication in the following requests&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this site for examples:&amp;nbsp;&lt;A class="link-titled" href="https://support.gpsgate.com/hc/en-us/articles/360008341874#testing" title="https://support.gpsgate.com/hc/en-us/articles/360008341874#testing"&gt;Use REST API for getting Events – GpsGate Support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing I can't figure out is how to either send the token in the "&lt;SPAN style="color: #424242; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;HTTP Authorization header&lt;SPAN&gt;&amp;nbsp;" in the following requests. Preferably I would like to do all this inside GeoEvent.&lt;BR /&gt;Initially I thought I could just send name/value pairs the Header Parameter of the Poll an External Website for JSON input connector.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #424242; background-color: #ffffff; font-weight: 300;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #424242; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #424242; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;Rasmus&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2019 21:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/766133#M5206</guid>
      <dc:creator>RasmusJensen</dc:creator>
      <dc:date>2019-09-13T21:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1113542#M6057</link>
      <description>&lt;P&gt;Reopen thsi issue, we have this problem too.&lt;/P&gt;&lt;P&gt;I found this&amp;nbsp;&lt;A href="https://github.com/Esri/http-inbound-auth-token-for-geoevent" target="_blank"&gt;https://github.com/Esri/http-inbound-auth-token-for-geoevent&lt;/A&gt;&amp;nbsp;from 2017&lt;/P&gt;&lt;P&gt;Does it solve the problem? Will it work in 10.8.1?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 10:06:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1113542#M6057</guid>
      <dc:creator>mody_buchbinder</dc:creator>
      <dc:date>2021-11-03T10:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1203218#M6321</link>
      <description>&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;Did you solve the issue with auth token authorization for input connector for geoevent?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 13:06:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1203218#M6321</guid>
      <dc:creator>AlexLeonov</dc:creator>
      <dc:date>2022-08-16T13:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1245777#M6451</link>
      <description>&lt;P&gt;The pattern suggested above by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;&amp;nbsp;is what you'll need to follow if you're limited to what you can configure out-of-the-box.&amp;nbsp;GeoEvent Server inputs which send HTTP/GET requests to query an external REST API for data need to incorporate all necessary data in the request URL as query parameters. Multiple requests to first obtain authorization and incorporate an authorization token in a second request are not something you can configure out-of-the-box. Available GeoEvent Server inbound connectors do not support the concept of authorization token expiry and refresh (like you might find when working with an authorization protocol or framework such as OAuth).&lt;/P&gt;&lt;P&gt;An input such as the &lt;EM&gt;Receive JSON on a REST Endpoint&lt;/EM&gt;, on the other hand, hosts a REST endpoint to which external clients can HTTP/POST data.&amp;nbsp;GeoEvent Server does not offer any sort of authorization or client authentication in this case. If the client can reach the GeoEvent Server's endpoint, the client is allowed to make an HTTP/POST request with a data payload.&lt;/P&gt;&lt;P&gt;You can develop a "relay" or "bridge" using any scripting or development SDK you are familiar with to handle the multiple steps required in a publisher/subscriber pattern. The bridge you develop between the data provider and GeoEvent Server would be responsible for sending a request to obtain use authorization and then sending periodic requests using that token to obtain data. The data response could then be relayed to GeoEvent Server via HTTP/POST. The bridge you develop in this case would also handle use authorization token expiry and periodic token refresh.&lt;/P&gt;&lt;P&gt;Looking at the contributor history it does not appear that the "Sample Http Inbound Transport" referred to above (&lt;A href="https://github.com/Esri/http-inbound-auth-token-for-geoevent" target="_self"&gt;http-inbound-auth-token-for-geoevent&lt;/A&gt;),&amp;nbsp;available on GitHub and developed for polling a REST endpoint,&amp;nbsp;is being actively maintained. I cannot say whether or not the sample transport can readily be incorporated into an inbound connector,&amp;nbsp;how such a connector was intended to be used, what assumptions it might make, or whether it will work with a particular release of ArcGIS Enterprise.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/95633"&gt;@EricIronside&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/9582"&gt;@MorakotPilouk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 19:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1245777#M6451</guid>
      <dc:creator>RJSunderman</dc:creator>
      <dc:date>2023-01-05T19:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: GeoEvent input connector using token authentication</title>
      <link>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1245896#M6452</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115391"&gt;@RJSunderman&lt;/a&gt;&amp;nbsp;mentioned, this two-factor authentication model is not supported by GeoEvent Server OOTB. The reason it is not OOTB is that there are an infinite number of ways this could be supported (similar to using dates or version numbers in the polling request) so there is no way it can be done in a reasonable manner that meets most needs. However, this is a pattern we have seen and implemented in several of the custom GeoEvent Gallery Connectors. So it can be done by creating a custom Transport using the GeoEvent Server SDK.&lt;/P&gt;&lt;P&gt;If you don't want to write a custom Transport, then a second option would be to use&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115391"&gt;@RJSunderman&lt;/a&gt;'s suggestion of using a bridge to push data to GeoEvent Server. This could be written in any language/implementation you are most comfortable with.&lt;/P&gt;&lt;P&gt;Finally, if you don't want to write a bridge you could use python to develop a scheduled script that updates the token within GeoEvent Server on a periodic basis.&amp;nbsp; For example, if your token is good for 24 hours, you could schedule a python script (using Windows Task Scheduler for example) to run every 20 hours and update the token.&amp;nbsp; If this is the route you are interested in taking pleas see this blog entry:&amp;nbsp;&lt;A title="Scripting tasks using the GeoEvent Admin API - Update Inputs" href="https://community.esri.com/t5/arcgis-geoevent-server-blog/scripting-tasks-using-the-geoevent-admin-api/ba-p/902008" target="_blank" rel="noopener"&gt;Scripting tasks using the GeoEvent Admin API - Update Inputs&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For even more information on what you could do with the GeoEvent Admin API, please see&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/115391"&gt;@RJSunderman&lt;/a&gt;'s blog that presents a number of examples:&amp;nbsp;&lt;A title="Scripting tasks using the GeoEvent Admin API" href="https://community.esri.com/t5/arcgis-geoevent-server-blog/scripting-tasks-using-the-geoevent-admin-api/ba-p/889677" target="_blank" rel="noopener"&gt;Scripting tasks using the GeoEvent Admin API&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 23:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/geoevent-input-connector-using-token/m-p/1245896#M6452</guid>
      <dc:creator>EricIronside</dc:creator>
      <dc:date>2023-01-05T23:00:21Z</dc:date>
    </item>
  </channel>
</rss>

