backend + web: Set passwords through email confirmation
This commit is contained in:
1 parent
bd8eb65e56
commit
ee5f1d3d10
23 files changed
+281
-110
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using Helpdesk.Web.Api;
|
||||
using Helpdesk.Web.Auth;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
@@ -9,6 +10,13 @@ namespace Helpdesk.Web.Tests;
|
||||
|
||||
internal static class WebTestSession
|
||||
{
|
||||
public static string AntiforgeryToken(string html)
|
||||
{
|
||||
var token = Regex.Match(html, "name=\"__RequestVerificationToken\"[^>]*value=\"([^\"]+)\"").Groups[1].Value;
|
||||
Assert.NotEmpty(token);
|
||||
return token;
|
||||
}
|
||||
|
||||
public static void SignIn(IServiceProvider services, HttpClient client, string role)
|
||||
{
|
||||
var scheme = CookieAuthenticationDefaults.AuthenticationScheme;
|
||||
|
||||
Reference in new issue
Block a user