Added password policy validation in install wizard
This commit is contained in:
@ -96,5 +96,13 @@ namespace Oqtane.Services
|
||||
/// <param name="token"></param>
|
||||
/// <returns></returns>
|
||||
Task<User> VerifyTwoFactorAsync(User user, string token);
|
||||
|
||||
/// <summary>
|
||||
/// Validate a users password against the password policy
|
||||
/// </summary>
|
||||
/// <param name="password"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> ValidatePasswordAsync(string password);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ using Oqtane.Models;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using Oqtane.Documentation;
|
||||
using System.Net;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
@ -73,5 +74,10 @@ namespace Oqtane.Services
|
||||
{
|
||||
return await PostJsonAsync<User>($"{Apiurl}/twofactor?token={token}", user);
|
||||
}
|
||||
|
||||
public async Task<bool> ValidatePasswordAsync(string password)
|
||||
{
|
||||
return await GetJsonAsync<bool>($"{Apiurl}/validate/{WebUtility.UrlEncode(password)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user