added token based registration.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-01-12 18:37:51 -07:00
parent bb4a8f7f83
commit 8815009b04
20 changed files with 581 additions and 125 deletions

View File

@@ -0,0 +1,8 @@
namespace CarCareTracker.Models
{
public class AdminViewModel
{
public List<UserData> Users { get; set; }
public List<Token> Tokens { get; set; }
}
}

View File

@@ -2,8 +2,7 @@
{
public class AuthCookie
{
public int Id { get; set; }
public string UserName { get; set; }
public UserData UserData { get; set; }
public DateTime ExpiresOn { get; set; }
}
}

View File

@@ -4,6 +4,7 @@
{
public string UserName { get; set; }
public string Password { get; set; }
public string Token { get; set; }
public bool IsPersistent { get; set; } = false;
}
}

8
Models/Login/Token.cs Normal file
View File

@@ -0,0 +1,8 @@
namespace CarCareTracker.Models
{
public class Token
{
public int Id { get; set; }
public string Body { get; set; }
}
}

10
Models/Login/UserData.cs Normal file
View File

@@ -0,0 +1,10 @@
namespace CarCareTracker.Models
{
public class UserData
{
public int Id { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public bool IsAdmin { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace CarCareTracker.Models
{
public class OperationResponse
{
public bool Success { get; set; }
public string Message { get; set; }
}
}