Get ArcGIS request token
I'm trying to set advanced permissions, based on a lookup table that is contained in the same mapservice as the layers I want to filter.
To do the request to the lookup table, I need to have a token, which would be the same as the token in the original request. Is there a way to get that token?
I suppose request.getParameter("token") would work, but unfortunately the token isn't always passed in as a request parameter. For instance, when using the ArcGIS rest interface, it can also be passed in as a cookie. The request object doesn't seem to expose that information.
-
Commentaire officiel
Using request.getParameter("token") is the only way to do this type of thing today. It works for GET and POST parameters only. We would need to make a change to expose the cookie and x-esri-authorization header variations. I will take a look and see if this is feasible.
--Ryan
-
Can anyone provide an example script on how to use the request.getParameter("token") function? I'm not having any luck getting it to work in my advanced script.
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
2 commentaires