Migration to EF and starting to add Identity #11

Merged
jtom38 merged 16 commits from features/ef-identity-migration into main 2023-07-09 22:19:01 -07:00
5 changed files with 47 additions and 0 deletions
Showing only changes of commit 06218af516 - Show all commits

View File

@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace Newsbot.Collector.Api.Domain.Requests;
public class RegisterUserRequest
{
//public string? Name { get; set; }
[EmailAddress]
public string? Email { get; set; }
public string? Password { get; set; }
}

View File

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace Newsbot.Collector.Api.Domain.Requests;
public class UserLoginRequest
{
[EmailAddress]
public string? Email { get; set; }
public string? Password { get; set; }
}

View File

@ -0,0 +1,6 @@
namespace Newsbot.Collector.Api.Domain.Response;
public class AuthFailedResponse
{
public IEnumerable<string>? Errors { get; set; }
}

View File

@ -0,0 +1,8 @@
namespace Newsbot.Collector.Api.Domain.Response;
public class AuthSuccessfulResponse
{
// might want to validate the user before we return the token
public string? Token { get; set; }
}

View File

@ -0,0 +1,11 @@
using System.Collections;
namespace Newsbot.Collector.Api.Domain.Results;
public class AuthenticationResult
{
public string? Token { get; set; }
public bool IsSuccessful { get; set; }
public IEnumerable<string>? ErrorMessage { get; set; }
}