They are for both, but in case of WPF, they only apply to an n-tier IIS deployment as in order to use ASP.NET security you need to deploy the EntityServer to IIS.
If you are building a 2-tier WPF application or run the EntityServer from the command line or as a Windows service, then you have to implement your own LoginManager that grabs the WindowsPrincipal upon login. The following shows how you can accomplish this in a 2-tier application. You can adapt the code accordingly for the other two scenarios.
public class AppBootstrapper : FrameworkBootstrapper<MainViewModel>
{
private IAuthenticationService _authenticationService;
static AppBootstrapper()
{
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
}
protected override void PrepareCompositionContainer(CompositionBatch batch)
{
base.PrepareCompositionContainer(batch);
batch.AddExportedValue(_authenticationService = new AuthenticationService());
}
protected override void StartRuntime()
{
base.StartRuntime();
_authenticationService.Login(null);
}
}
public class WindowsLoginManager : IEntityLoginManager
{
#region IEntityLoginManager Members
public IPrincipal Login(ILoginCredential credential, EntityManager entityManager)
{
return Thread.CurrentPrincipal;
}
public void Logout(IPrincipal principal, EntityManager entityManager)
{
}
#endregion
}