webdav portal password reset added
This commit is contained in:
parent
4bae47e17f
commit
599e9a8865
48 changed files with 1163 additions and 117 deletions
|
@ -3192,7 +3192,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
public static int AddAccessToken(AccessToken token)
|
||||
{
|
||||
return AddAccessToken(token.AccessTokenGuid, token.AccountId, token.ItemId, token.ExpirationDate, token.Type);
|
||||
return AddAccessToken(token.AccessTokenGuid, token.AccountId, token.ItemId, token.ExpirationDate, token.TokenType);
|
||||
}
|
||||
|
||||
public static int AddAccessToken(Guid accessToken, int accountId, int itemId, DateTime expirationDate, AccessTokenTypes type)
|
||||
|
@ -3216,6 +3216,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return Convert.ToInt32(prmId.Value);
|
||||
}
|
||||
|
||||
public static void SetAccessTokenResponseMessage(Guid accessToken, string response)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"SetAccessTokenSmsResponse",
|
||||
new SqlParameter("@AccessToken", accessToken),
|
||||
new SqlParameter("@SmsResponse", response)
|
||||
);
|
||||
}
|
||||
|
||||
public static void DeleteExpiredAccessTokens()
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
|
@ -3236,6 +3247,17 @@ namespace WebsitePanel.EnterpriseServer
|
|||
);
|
||||
}
|
||||
|
||||
public static void DeleteAccessToken(Guid accessToken, AccessTokenTypes type)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"DeleteAccessToken",
|
||||
new SqlParameter("@AccessToken", accessToken),
|
||||
new SqlParameter("@TokenType", type)
|
||||
);
|
||||
}
|
||||
|
||||
public static void UpdateOrganizationSettings(int itemId, string settingsName, string xml)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
|
||||
|
|
|
@ -1625,6 +1625,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
|
||||
}
|
||||
|
||||
public static void DeleteAccessToken(Guid accessToken, AccessTokenTypes type)
|
||||
{
|
||||
DataProvider.DeleteAccessToken(accessToken, type);
|
||||
}
|
||||
|
||||
public static void DeleteAllExpiredTokens()
|
||||
{
|
||||
DataProvider.DeleteExpiredAccessTokens();
|
||||
|
@ -1632,7 +1637,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
private static string GenerateUserPasswordResetLink(int itemId, int accountId)
|
||||
{
|
||||
string passwordResetUrlFormat = "account/password-reset";
|
||||
string passwordResetUrlFormat = "account/password-reset/step-2";
|
||||
|
||||
var settings = SystemController.GetSystemSettings(SystemSettings.WEBDAV_PORTAL_SETTINGS);
|
||||
|
||||
|
@ -1656,7 +1661,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
AccessTokenGuid = Guid.NewGuid(),
|
||||
ItemId = itemId,
|
||||
AccountId = accountId,
|
||||
Type = type,
|
||||
TokenType = type,
|
||||
ExpirationDate = DateTime.Now.AddHours(12)
|
||||
};
|
||||
|
||||
|
@ -1665,6 +1670,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return token;
|
||||
}
|
||||
|
||||
public static void SetAccessTokenResponse(Guid accessToken, string response)
|
||||
{
|
||||
DataProvider.SetAccessTokenResponseMessage(accessToken, response);
|
||||
}
|
||||
|
||||
public static void UpdateOrganizationPasswordSettings(int itemId, OrganizationPasswordSettings settings)
|
||||
{
|
||||
TaskManager.StartTask("ORGANIZATION", "UPDATE_PASSWORD_SETTINGS");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue