Select to view content in your preferred language

Login to ArcGIS Server Secured Services

1143
12
Jump to solution
01-16-2014 03:27 PM
TomSellsted
MVP Regular Contributor
Greetings!  I am working on a JS API app that uses some secured ArcGIS Server services.  The IdentityManager does work well for this purpose, but I am using a Windows Domain for my user store and the app users have to type in a complete domain\username to be able to properly log in.  This is not a big deal on a desktop, but it is much more difficult from an iPhone.

Is there a way to bypass the IdentityManager and save the username, so they don't have to type it in? They would still need to type in a password?

Thanks very much!
0 Kudos
12 Replies
TomSellsted
MVP Regular Contributor
It appears that the dialog-create fires before the dialog is actually created, not just after.  The only way I could find to add an event to it was a bit of jQuery.  This is not ideal as the dialog name might change ect...  It would be ideal to have another event that would fire when the dialog is displayed.  Here is the jquery line of code:

$('body').on('show','#dijit_Dialog_0',loadUsername);
0 Kudos
JonathanUihlein
Esri Regular Contributor
Did some quick research and the dialog-create event was working for me.

 
IdentityManager.on('dialog-create', testFunction);


function testFunction(){
        IdentityManager.dialog.txtUser_.set("value", "jon");
        //dijit.byId("dijit_form_ValidationTextBox_0").set("value", "jon");
}


You can use either of these... the dialog object itself is referenced as a property of the IdentityManager object.

Hope this helps... I suspect it may not be the penultimate solution but will wait to hear from you.
0 Kudos
TomSellsted
MVP Regular Contributor
Perfect Jon!  I had the IdentityManager listed in the require statement, but I did not have it listed in the function variables.  Thanks very much!
0 Kudos