This commit is contained in:
vfedosevich 2015-01-16 00:38:07 -08:00
parent f2c54df2b0
commit 41a540bd1e
13 changed files with 165 additions and 114 deletions

View file

@ -25,12 +25,17 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication
public WspPrincipal LogIn(string login, string password)
{
if (_principalContext.ValidateCredentials(login, password) == false)
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
{
return null;
}
//var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
if (_principalContext.ValidateCredentials(login, password) == false && user != null)
{
return null;
}
var principal = new WspPrincipal(login);