About generated token

190
4
03-18-2019 10:14 AM
聖智王
New Contributor II

hello everyone!

does anyone know how to identify a token generated from which username?

thank you!

0 Kudos
4 Replies
BirajaNayak
Esri Contributor

Please go to browser and add token in front of any service for which token is generated to access as per below example. You find the user name on the top right corner of the rest end point service marked in screen capture provided below.

Example:

https://xxxx.esri.com/server/rest/services/parceltest/MapServer?token=token value

Thanks,

Biraja

聖智王
New Contributor II

thank you for the information. But this way is valid only when the token is not expired.I think that the generated token log should be implemented by developer!

0 Kudos
BirajaNayak
Esri Contributor

True. It is valid only when token is not expired.  

0 Kudos
BirajaNayak
Esri Contributor

In Java Script API, you can try the following:

Use method findCredential() in "IdentityManager"  which will return "credential". Then get user information using "userId" from credential property.

Thanks,

Biraja