In api-reference, I found solution for authentication with token base which I need to use a proxy page.
I would appreciate, if you give me some suggestion for do it without a proxy page.
Solved! Go to Solution.
Take a look at this sample: arcgis-runtime-samples-dotnet/TokenSecuredServices.xaml.cs at master · Esri/arcgis-runtime-samples-d...
The sample that Rex pointed out demonstrates how to develop your own SignIn UI.
Alternatively, for WinPhone and Desktop platforms, you can use the UI provided by the toolkit and the SignInChallengeHandler component.
To activate this component, add this line of code at the startup of your application:
IdentityManager.Current.ChallengeHandler = new Esri.ArcGISRuntime.Toolkit.Security.SignInChallengeHandler();
Compared to the sample, the toolkit SignInChallengeHandler component offers additional advantages:
The credentials storage is not active by default. To get it, you need to set to true the property AllowSaveCredentials:
IdentityManager.Current.ChallengeHandler = new Esri.ArcGISRuntime.Toolkit.Security.SignInChallengeHandler
{ AllowSaveCredentials = true, CredentialSaveOption = CredentialSaveOption.Selected }; // set it to CredentialSaveOption.Hidden if it's not an user choice
Note that for WinStore platform, the SignIn UI component is built in the API, so you get it by default.
However the credentials storage is not active by default. You can activate it with code like:
var challengeHandler = IdentityManager.Current.ChallengeHandler as DefaultChallengeHandler;
challengeHandler.AllowSaveCredentials = true;