backend + web: Add admin account lifecycle management
This commit is contained in:
1 parent
fcf7cd0596
commit
91d0c06c83
25 files changed
+1148
-97
No files matched your search
@@ -77,7 +77,7 @@ public sealed class BackendFixture : IAsyncLifetime
|
||||
var user = await ReadAsync<UserDto>(client.PostAsJsonAsync("/api/v1/auth/register",
|
||||
new RegisterRequest(address, Password, "Test", "User"), Cancellation), HttpStatusCode.Created);
|
||||
await ExpectAsync(client.PostAsJsonAsync("/api/v1/auth/confirm-email",
|
||||
new EmailTokenRequest(await email.TakeTokenAsync(address, "/confirm-email")), Cancellation), HttpStatusCode.NoContent);
|
||||
new EmailTokenRequest(await TakeConfirmationTokenAsync(address)), Cancellation), HttpStatusCode.NoContent);
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -89,6 +89,8 @@ public sealed class BackendFixture : IAsyncLifetime
|
||||
return await LoginAsync(anonymous, user.Email);
|
||||
}
|
||||
|
||||
internal Task<string> TakeConfirmationTokenAsync(string address) => email.TakeTokenAsync(address, "/confirm-email");
|
||||
|
||||
internal Task<string> TakeResetTokenAsync(string address) => email.TakeTokenAsync(address, "/reset-password");
|
||||
|
||||
internal void FailNextEmail(string address, string reason, bool retryable) =>
|
||||
|
||||
Reference in new issue
Block a user