Select to view content in your preferred language

Customizing the Identity Manager (API 3.0)

2041
4
Jump to solution
10-22-2012 06:12 AM
BethManghi
Regular Contributor
I'm trying to take advantage of the Identity Manager but I'm having difficulty figuring out how to customize the title window for the Identity Manager.  I've tracked down the SignInWindow class and made changes, but how do I get my custom class work with the Identity Manager?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
4 Replies
DasaPaddock
Esri Regular Contributor
0 Kudos
BethManghi
Regular Contributor
Thanks for your response, Dasa!  I finally got it working after setting the class this way:

IdentityManager.instance.signInWindowClass = skins.supportClasses.SignInCustom;
0 Kudos
BrianKraus
Occasional Contributor
Hi Beth and Dasa.

Would either of you be able to clarify this example a little bit more; I'm still having a little trouble wrapping my head around how to make this whole login window work.

I am using the source code to the Flexviewer application, and my application is a modified version of this using some custom widget containers I have designed.  I therefore copied the SignInWindow class into src/com/esri/viewer/skins directory in order to have access to it in my project.

I am presuming that the whole IdentityManager functionality checks against users that are created within ArcGIS Server Manager, correct? (I have users created there and the server enabled to utilize those users as opposed to Windows domain users)

I am still baffled as to how I might have the sign-in window appear and challenge the user when they access my viewer.  I am not certain where I place the "IdentityManager.instance.signInWindowClass =skins.CustomSignInWindow;" or the "import com.esri.ags.components.IdentityManager;".  Does something like this go in the <index.mxml> component?

I am of course looking to limit users utilizing the viewer and services it provides, but I am hopeful that by logging in, I can access their username/login within my application.  That is the username will be an email address, which I would like to be able to pass to a widget they will access, which in turn will pass that along to a custom GP service.  Once the user successfully logs in, how am I able to access the username information in this manner?

Thanks for any thoughts and guidance on this.  If you need any more elaboration/clarification, please let me know; I'll try my best to explain better.
0 Kudos
DasaPaddock
Esri Regular Contributor
I'd set the "signInWindowClass" property after this line:
https://github.com/Esri/arcgis-viewer-flex/blob/3.2-src/src/com/esri/viewer/ViewerContainer.mxml#L10...

After the user signs in, you can call "findCredential" to get the Credential which includes a "userId" property.
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/components/IdentityManager.html#fin...
0 Kudos