Added password policy validation in install wizard

This commit is contained in:
Shaun Walker
2022-03-08 08:31:18 -05:00
parent 003f14003e
commit f250aff99b
5 changed files with 121 additions and 88 deletions

View File

@ -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)}");
}
}
}