Select to view content in your preferred language

IdentifyManger

959
3
09-06-2012 07:46 AM
p_thibault
Emerging Contributor
I am trying to use the     

dojo.require("esri.IdentityManager"); . 

My page simply ignores it.  My understanding is, when adding a featureServer, it should call it and require a login.  This does not happen.

var conditions = new esri.layers.FeatureLayer("http://gistest2:6080/ArcGIS/rest/services/roadwork2/FeatureServer/0",{
        mode:esri.layers.FeatureLayer.MODE_ONDEMAND,
        outFields:["*"]
      });
      map.addLayers([conditions]);

I am running iis7 and using 10.1 and javascript api 3.0.

Do I need to do any kind of setup on arcgis manager or iis7 virtual directories?
0 Kudos
3 Replies
KellyHutchins
Esri Frequent Contributor
If your application is accessing services on a different domain then you'll need a proxy to get around the same origin policy. For more details on the proxy and CORS see the 'Using a proxy' and 'CORS' sections in this doc:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_esri_request.html


You'll also need to have an SSL certificate on the server that hosts the application and proxy. This is necessary because we prevent authentication requests over http because sensitive data sent via GET can be viewed in server logs. To prevent this the identity manager requires that you use POST over https to ensure your credentials are secure.
0 Kudos
derekswingley1
Deactivated User
Just to piggy back on what Kelly said, the Identity Manager requires SSL so you have to run your app over https and access your map/feature services over https.
0 Kudos
p_thibault
Emerging Contributor
Thanks.

I have now put a server certificate on.  When I call the featurelayer using a https the layer does not render on the map, if I call it with a simple http it does render it on the map.

  var conditions = new esri.layers.FeatureLayer("https://gistest2:6080/ArcGIS/rest/services/roadwork2/FeatureServer/0",{
        mode:esri.layers.FeatureLayer.MODE_ONDEMAND,
        outFields:["*"]
      });

So, i think that the https call is triggering the identitymanager, but I do not see a log on box.


I am calling the entire appliation using https://gistest2.dcny.gov/roadwork/...

No errors, just no login box.  Any ideas?
0 Kudos