Adds User Component

This commit is contained in:
Janus Knudsen 2025-03-04 17:13:02 +01:00
parent 73a1f11e99
commit 69758735de
14 changed files with 222 additions and 65 deletions

View file

@ -1,10 +1,11 @@
using Insight.Database;
using PlanTempus.Core;
using PlanTempus.Core.Entities.Users;
using System.Data;
namespace PlanTempus.Database.Core
{
public class UserService
public class UserService
{
public record UserCreateCommand(string CorrelationId, string Email, string Password);
@ -21,7 +22,7 @@ namespace PlanTempus.Database.Core
var user = new User
{
Email = command.Email,
PasswordHash = PasswordHasher.HashPassword(command.Password),
PasswordHash = new SecureTokenizer().TokenizeText(command.Password),
SecurityStamp = Guid.NewGuid().ToString(),
EmailConfirmed = false,
CreatedDate = DateTime.UtcNow