Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

How to retrieve the stored token from default Identity Manager Class?

$
0
0
I want to use the token that is generated when a user inputs their username and password into the default signInWindow class upon accessing a secure layer.

In my ViewerContainer.mxml, I have left the Identity Manager enabled (the default).
Code:

IdentityManager.instance.enabled = true;
Therefore, when a secure layer is loaded as an operational layer in the config.xml and no token value is provided, the user will be prompted to enter a username and password. After inputting the password, the Flex API V3.1 BaseTask.as seems to generate a token using those input credentials. This token is then stored somewhere for the duration of the short-term token limit (default of 60 minutes I think).

I can't figure out how to access this token to use it in custom widgets on the secure layers. I have seen all of the functionals like findCredential and similar found in the Identity Manager Class (http://resources.arcgis.com/en/help/...nInWindowClass), but can't seem to retrieve the token.

If I could actually see the Flex API source code, then I could likely figure this one out, but I don't think the source code for the Esri Flex API is publicly available. It looks like what I'm trying to do is pretty easy in the Javascript API because they store the token in an easily accessible place in esri.id[credentials].

How do I retrieve the token from the API?

And if this is not possible, would anyone have an idea on a workaround?

Viewing all articles
Browse latest Browse all 2097

Trending Articles