ESRI.ArcGIS.Client.Toolkit.SignInDialog.DoSignInEx C# (CSharp) Method

DoSignInEx() public static method

Static challenge method leaveraging the SignInDialog in a child window. This method manages all credential types. Note however that in case of certificate authentication the SignInDialog UI is not used. The standard .Net dialog box for selecting an X.509 certificate from a certificate collection is used instead.
public static DoSignInEx ( IdentityManager credentialRequestInfos, Exception>.Action callback, IdentityManager generateTokenOptions = null ) : void
credentialRequestInfos IdentityManager The information about the credential to get.
callback Exception>.Action The callback.
generateTokenOptions IdentityManager The generate token options.
return void
		public static void DoSignInEx(IdentityManager.CredentialRequestInfos credentialRequestInfos, Action<IdentityManager.Credential, Exception> callback, IdentityManager.GenerateTokenOptions generateTokenOptions = null)
		{
			// Check if IWA authentication might be OK
			if (ChallengeIWA(credentialRequestInfos, callback))
				return;

			// Display UI for challenging
			System.Windows.Threading.Dispatcher d = null;
			if (Application.Current != null)
				d = Application.Current.Dispatcher;

			if (d != null && !d.CheckAccess())
			{
				//Ensure we are showing up the SignInDialog on the UI thread
				d.BeginInvoke((Action)(() => DoSignInInUIThreadEx(credentialRequestInfos, callback, generateTokenOptions)));
			}
			else
				DoSignInInUIThreadEx(credentialRequestInfos, callback, generateTokenOptions);
		}