Select to view content in your preferred language

Using token based secured services

1108
3
Jump to solution
09-04-2013 12:15 PM
YimanSong
Regular Contributor
New to JS

How do I embed credentials in order to use a secured service? Can anyone provide samples on how to use IdentityManagerBase?
0 Kudos
1 Solution

Accepted Solutions
KenBurcham
Deactivated User
What I tend to do is just append the token to the end of my service urls:

http: // data.yourdomain.com/arcgis/rest/services/SomeMapService/MapServer/0?token=AREALLYLONGSTRING

This works fine, but with the down-side that said url (and token) will be available to view from the client.  However, when I generate my token, I use the http referrer method, which means the token is useless unless coming from my own server folder.  But as John said above, the proxy method works great, too (and is required when doing things like feature editing).

ken.

View solution in original post

0 Kudos
3 Replies
JohnGravois
Deactivated User
if you want to enable users to access secure services without signing in, one valid approach is to use a proxy to hide the credentials or token.
0 Kudos
YimanSong
Regular Contributor
if you want to enable users to access secure services without signing in, one valid approach is to use a proxy to hide the credentials or token.


How does token work, if it doesn't require proxy?
0 Kudos
KenBurcham
Deactivated User
What I tend to do is just append the token to the end of my service urls:

http: // data.yourdomain.com/arcgis/rest/services/SomeMapService/MapServer/0?token=AREALLYLONGSTRING

This works fine, but with the down-side that said url (and token) will be available to view from the client.  However, when I generate my token, I use the http referrer method, which means the token is useless unless coming from my own server folder.  But as John said above, the proxy method works great, too (and is required when doing things like feature editing).

ken.
0 Kudos