Accessing secure web map services from a custom web mapping application

3450
4
09-11-2015 04:04 PM
JonathanBailey
Occasional Contributor III

I'm building a custom web mapping application for a client. The application will be hosted externally to ArcGIS Online, but the application is registered with AGOL. The application will access the client's secured AGOL web map services.

I'd like for the user to be able to log in to AGOL, open the application, and not have to log in again. However, each request for a secured resource from AGOL results in a login challenge.

I've set up the web proxy to avoid this problem, but it seems that the web proxy allows anyone access to the secured AGOL web map services.

So, it seems that my options are:

  1. Allow all users access to the client's secured AGOL web map services (hint: not an option).
  2. Require users to provide their login information each time a request is made to a secured AGOL service (hint: again, not an option).

Am I missing something? Is it not possible to do this?

0 Kudos
4 Replies
KellyHutchins
Esri Frequent Contributor

How are you currently handling authentication in your custom app? Are you using the OAuth approach outlined in this sample:

https://developers.arcgis.com/javascript/jssamples/portal_oauth_inline.html

If the user logging in to the app has permission to access the secure services then it should not prompt for each request.  However if the user doesn't have permission then it will prompt again.

0 Kudos
BrianO_keefe
Occasional Contributor III

So you have configured a proxy to avoid having the user login to access AGOL secured services?

I need to know how to do to this! Would you care to share how?

0 Kudos
JonathanBailey
Occasional Contributor III

Hi Brian,

It turns out that the proxy isn't the whole story ... there are other moving parts as well. I currently have a support incident opened with Esri in order to resolve this. I'll post the results when completed.

0 Kudos
BrianO_keefe
Occasional Contributor III

I'm still curious about how you solve your issue, but I've figured out the proxy situation I was dealing with. GOOD LUCK!