<?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: Specifying token for map service gets redirected to login page in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223401#M1116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is what was sent by a medium level technical analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;===========&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you got the token key, could you access the map service directly by attaching the token key after map service url? e.g. &lt;/SPAN&gt;&lt;A href="Http://YourServerName/arcgis/rest/service/MapName/MapServer?token="&gt;Http://YourServerName/arcgis/rest/service/MapName/MapServer?token=&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=========&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The answer is no -- we are redirected to the login page.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jul 2011 15:07:21 GMT</pubDate>
    <dc:creator>CarolynWhite</dc:creator>
    <dc:date>2011-07-04T15:07:21Z</dc:date>
    <item>
      <title>Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223397#M1112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I went to &lt;/SPAN&gt;&lt;A href="http://myserver/ArcGIS/rest/services"&gt;http://myserver/ArcGIS/rest/services&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and generated a token. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The token was for userA and so should show the serviceA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I then used that token&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://myserver/ArcGIS/rest/services/serviceA/Mapserver?token="&gt;http://myserver/ArcGIS/rest/services/serviceA/Mapserver?token=&lt;/A&gt;&lt;SPAN&gt; token value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I was sent to the login page.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I enter the login/pw for userA and then was able to open the serviceA metadata and see serviceA in the javascript api. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So while I had to give the login/pw to generate the token&amp;nbsp; - the user still has to login.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that how it is suppose to work? or having passed the token obtained for userA should I be able to see serviceA without another login?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My security store is sqlserver. I have https turned off for now in development.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jul 2011 14:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223397#M1112</guid>
      <dc:creator>CarolynWhite</dc:creator>
      <dc:date>2011-07-02T14:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223398#M1113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I assume that you are developing an application based on one of the web APIs such as JavaScript, Flex, or Silverlight.&amp;nbsp; In this case you have to handle security.&amp;nbsp; There are 2 choices here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Client software gets a token from the server and passes that token to the various client APIs when accessing services.&amp;nbsp; In this case the "login page" is in the client software.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Design a web application, e.g. ASP.NET, which is essentially a proxy.&amp;nbsp; The proxy authenticates users and has a login page.&amp;nbsp; When a request comes from an authenticated client, it appends the token to the request and then forwards it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2011 11:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223398#M1113</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-07-03T11:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223399#M1114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I assume that you are developing an application based on one of the web APIs such as JavaScript, Flex, or Silverlight.&amp;nbsp; In this case you have to handle security.&amp;nbsp; There are 2 choices here:&lt;BR /&gt;&lt;BR /&gt;1) Client software gets a token from the server and passes that token to the various client APIs when accessing services.&amp;nbsp; In this case the "login page" is in the client software.&lt;BR /&gt;2) Design a web application, e.g. ASP.NET, which is essentially a proxy.&amp;nbsp; The proxy authenticates users and has a login page.&amp;nbsp; When a request comes from an authenticated client, it appends the token to the request and then forwards it.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, developing an SL app, but that is unrelated to the problem at hand right now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2011 21:20:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223399#M1114</guid>
      <dc:creator>CarolynWhite</dc:creator>
      <dc:date>2011-07-03T21:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223400#M1115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think that you are approaching the problem in wrong manner.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/index.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is quote from the above link: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Services Directory allows you to browse the contents of an ArcGIS Server and obtain information that can be useful to you when developing applications."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, this is not the REST endpoint which your Web API applications will use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tokens do work using the REST API and all of the Web APIs supports tokens as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If, after reading the above, this is not clear then I suggest to Google on the various security presentations given at past Developer Summits.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 11:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223400#M1115</guid>
      <dc:creator>RichardWatson</dc:creator>
      <dc:date>2011-07-04T11:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223401#M1116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is what was sent by a medium level technical analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;===========&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you got the token key, could you access the map service directly by attaching the token key after map service url? e.g. &lt;/SPAN&gt;&lt;A href="Http://YourServerName/arcgis/rest/service/MapName/MapServer?token="&gt;Http://YourServerName/arcgis/rest/service/MapName/MapServer?token=&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;=========&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The answer is no -- we are redirected to the login page.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 15:07:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223401#M1116</guid>
      <dc:creator>CarolynWhite</dc:creator>
      <dc:date>2011-07-04T15:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223402#M1117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Carolyn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When generating the token, what was used as input to the clientID parameter (referer or ip address)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000q5000000.htm"&gt;http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000q5000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If a referer was used, the refer header of the requesting application should match the referer used in the token, otherwise, the token will be invalid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Similarly if an ip address was used, the request using the token should originate from the ip that is tied to the token.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ravi&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 21:16:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223402#M1117</guid>
      <dc:creator>RaviNarayanan</dc:creator>
      <dc:date>2011-07-06T21:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223403#M1118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to "Testing access to secured services" section on &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Securing_services_with_users_and_roles_specific_to_ArcGIS_Server/01540000050t000000/"&gt;this page&lt;/A&gt;&lt;SPAN&gt;, Carolyn's test should work.&amp;nbsp; I'm however having the same problem and lack of clarification on the issue is frustrating.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First, all Esri's documentation points to the token page as &lt;/SPAN&gt;&lt;A href="http://myserver:6080/arcgis/tokens"&gt;http://myserver:6080/arcgis/tokens&lt;/A&gt;&lt;SPAN&gt; where as the actual url is&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://myserver:6080/arcgis/admin/generateToken"&gt;http://myserver:6080/arcgis/admin/generateToken&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp; You need to update this in your documentation, and fix the link in the REST services page. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Secondly, if I put at the HTTP referrer &lt;/SPAN&gt;&lt;A href="http://myserver:8080/arcgis/services/myfolder/myservice/MapServer"&gt;http://myserver:8080/arcgis/services/myfolder/myservice/MapServer&lt;/A&gt;&lt;SPAN&gt;, and generate a token for a user that has access to that map server, I should be able to go to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;A href="http://myserver:8080/arcgis/services/myfolder/myservice/MapServer?token=mytoken"&gt;http://myserver:8080/arcgis/services/myfolder/myservice/MapServer?token=mytoken&lt;/A&gt;&lt;SPAN&gt; and gain access to the page according to Esri's documentation.&amp;nbsp; As Carolyn pointed out, this doesn't work.&amp;nbsp; If it's not supposed to, fix the "Testing access to secured services" section in your documentation.&amp;nbsp; If I'm not supposed to be using the HTTP Referrer in this way, please let me know and I can use the client IP address instead.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 16:45:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223403#M1118</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2013-03-12T16:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223404#M1119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using ArcGIS Server 10.2.2. I'm seeing the same thing as Carolyn and Jay. Using .../MapServer?token=mytoken takes me to the login page. I then need to login to see the Service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why are there two places to generate a token?:&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;&lt;SPAN class="jive-link-external-small"&gt;&lt;A class="jive-link-external-small" href="https://MyDomain/arcgis/admin/generatetoken" rel="nofollow" target="_blank"&gt;https://MyDomain/arcgis/admin/generatetoken&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;&lt;SPAN class="jive-link-external-small"&gt;&lt;A class="jive-link-external-small" href="https://MyDomain/arcgis/tokens/" rel="nofollow" target="_blank"&gt;https://MyDomain/arcgis/tokens/&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #222222; font-family: arial, sans-serif; font-size: small; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;I can only get the 'admin' one to work for us when using it through the Internet. Both seem to work locally. Any thoughts, ESRI. How do we 'test'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2015 18:20:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223404#M1119</guid>
      <dc:creator>DonaldBrown</dc:creator>
      <dc:date>2015-04-01T18:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223405#M1120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to generate the token from the Get Token URL on the &lt;A href="http://mydomain/arcgis/rest/services/"&gt;http://mydomain/arcgis/rest/services/&lt;/A&gt; page.&amp;nbsp; Upper right corner next to Login.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I normally use Request IP for the Client parameter.&amp;nbsp; If you have the credentials correct, you should see a long alpha-numeric string of characters, the token. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your browser, after appending that to your service endpoint url using ?token=, where it used to say Login, you should now see "Logged in " along with the domain\username of the credentials you used to get the token.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have any secured services, and the account you used for the token has access to those secured services, you should now be able to see them listed in the folders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If not, you might have some things left to configure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using https can be especially troublesome if you don't have the certificate/domain name configured correctly, or if you are entering them in an manner that is not consistent with your certificate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 19:16:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223405#M1120</guid>
      <dc:creator>AndrewBrown</dc:creator>
      <dc:date>2015-04-03T19:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying token for map service gets redirected to login page</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223406#M1121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, now it's working if I choose 'Request IP' (I was selecting 'HTTP referer' before). Not sure why it doesn't work for 'HTTP referer'. Thanks for the hint, that gets me a little farther.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2015 20:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/specifying-token-for-map-service-gets-redirected/m-p/223406#M1121</guid>
      <dc:creator>DonaldBrown</dc:creator>
      <dc:date>2015-04-03T20:45:05Z</dc:date>
    </item>
  </channel>
</rss>

