Can I Secure Web Application?

10-17-2016 06:07 AM
Occasional Contributor II

I am using secured map service for one of my applications. When I open the application, the authentication window opens asking for password and user id. Is there any way I can specify the user id and password in the code for application, so it uses it automatically when the application opens?


0 Kudos
4 Replies
Esri Esteemed Contributor

Hi Liana,

Are you using an application built with Web AppBuilder?  If you are, you can add the secure service to ArcGIS Online as an item.  You will be prompted for the username/password and have the option to store the username/password with the item.  See the following help document:

Add items—ArcGIS Online Help | ArcGIS 

You could also setup a proxy:

Using the proxy | Guide | ArcGIS API for JavaScript 3.18 

Here is an example of a proxy.config file with a username/password for a secure service:

<serverUrl url="" 
     username="user1" password="gis12345" matchAll="true">
</serverUrl>     ‍‍‍
Occasional Contributor II

Hi Jake,

thank you for your reply!

Yes, I am using WAB Developer Edition. I set up the proxy by adding proxy folder to my application and including server url information to proxy.config file.

Since I am doing it for the first time, I am bit confused on what I should write in the applications' config.json file.. Path to the proxy?

Now it is like that:

0 Kudos
MVP Legendary Contributor


   That is where the second link in my reply helps.

0 Kudos