webdav portal password change page added
This commit is contained in:
parent
dd15673752
commit
4bae47e17f
35 changed files with 2010 additions and 93 deletions
|
@ -26,14 +26,7 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication
|
|||
|
||||
public WspPrincipal LogIn(string login, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
|
||||
|
||||
if (user == null || _principalContext.ValidateCredentials(login, password) == false)
|
||||
if (ValidateAuthenticationData(login, password) == false)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -83,5 +76,22 @@ namespace WebsitePanel.WebDav.Core.Security.Authentication
|
|||
{
|
||||
FormsAuthentication.SignOut();
|
||||
}
|
||||
|
||||
public bool ValidateAuthenticationData(string login, string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var user = UserPrincipal.FindByIdentity(_principalContext, IdentityType.UserPrincipalName, login);
|
||||
|
||||
if (user == null || _principalContext.ValidateCredentials(login, password) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue