Select to view content in your preferred language

Flex Map 3.6 Using Token for Auto Login?

2431
4
05-27-2014 05:06 AM
CCWeedcontrol
Frequent Contributor
Hi All,
I'm trying to automate the login credentials for a flex map that is only accessible on our intranet. I can successfully pull down services from AGOL but it asks for login credentials every time the map is reloaded. I have noticed that there is a "Token" option under the layer configuration in Flex Builder. Is this the right place to look and how do I go about setting it up?

To clarify I am trying to authenticate with my AGOL credentials.

I'm using:
ArcGIS Viewer for Flex 3.6
Services from local ArcGIS Server 10.2 and AGOL

Is this the place to start?
[ATTACH=CONFIG]34099[/ATTACH]

This is my problem: I'd like to make this not appear.
[ATTACH=CONFIG]34100[/ATTACH]

Thanks!
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
John,

   You could log into your rest service and get a long lived token and use it in the dialog you have shown or you can setup a proxy to authenticate for you. The new proxy resource available here allows for automatically logging into AGOL:

https://github.com/Esri/resource-proxy
0 Kudos
by Anonymous User
Not applicable
Original User: CCweedcontrol

Ok cool,
Is it possible to get a long lived token from an AGOL hosted feature service or is the only option for AGOL through a proxy? All the documentation I am finding refers to ArcGIS for Server and the rest services on our ArcGIS Server do not need authentication in this instance.  🙂
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
John,

  I do not use AGOL hosted services so I can not answer this. I would suspect that the answer is no. If you go the proxy route it would not be a concern though.
0 Kudos
by Anonymous User
Not applicable
Original User: CCweedcontrol

Robert,
Ok. I'll go the proxy route. Thanks for the help!

Cheers,
John
0 Kudos