Select to view content in your preferred language

Detect Authentication Challenge from Feature Layer?

951
3
Jump to solution
11-01-2012 10:55 AM
MattMiley
Deactivated User
Is it possible to Detect Authentication Challenge from a feature layer?

Then i can make the sign in dialog visible only whenever this challenge happens?
0 Kudos
1 Solution

Accepted Solutions
DominiqueBroux
Esri Frequent Contributor
The simplest way to activate the IdentityManager is to initialize a challenge method using the built-in SignInDialog (sample).
Something like:    
IdentityManager.Current.ChallengeMethod = SignInDialog.DoSignIn;


The sign in dialog will automatically show up when an authentication is needed.

For advanced scenarios, you can also create you own challenge method and react differently depending on the server url.

View solution in original post

0 Kudos
3 Replies
RichardWatson
Deactivated User
I don't think that this is what you are looking for but you could programmatically send an HTTP request to the feature layer(s) and parse the response(s) yourself.
0 Kudos
MattMiley
Deactivated User
I don't think that this is what you are looking for but you could programmatically send an HTTP request to the feature layer(s) and parse the response(s) yourself.


That just sounds like too much work, I guess I hoping for some kind of event to be able to watch for to know when to display the signin dialog and or make it disappear whenever there aren't any layers challenging for Authentication.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
The simplest way to activate the IdentityManager is to initialize a challenge method using the built-in SignInDialog (sample).
Something like:    
IdentityManager.Current.ChallengeMethod = SignInDialog.DoSignIn;


The sign in dialog will automatically show up when an authentication is needed.

For advanced scenarios, you can also create you own challenge method and react differently depending on the server url.
0 Kudos