diff --git a/Newsbot.Collector.Api/Domain/Requests/RegisterUserRequest.cs b/Newsbot.Collector.Api/Domain/Requests/RegisterUserRequest.cs new file mode 100644 index 0000000..461615c --- /dev/null +++ b/Newsbot.Collector.Api/Domain/Requests/RegisterUserRequest.cs @@ -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; } + +} \ No newline at end of file diff --git a/Newsbot.Collector.Api/Domain/Requests/UserLoginRequest.cs b/Newsbot.Collector.Api/Domain/Requests/UserLoginRequest.cs new file mode 100644 index 0000000..8b34017 --- /dev/null +++ b/Newsbot.Collector.Api/Domain/Requests/UserLoginRequest.cs @@ -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; } +} \ No newline at end of file diff --git a/Newsbot.Collector.Api/Domain/Response/AuthFailedResponse.cs b/Newsbot.Collector.Api/Domain/Response/AuthFailedResponse.cs new file mode 100644 index 0000000..891c195 --- /dev/null +++ b/Newsbot.Collector.Api/Domain/Response/AuthFailedResponse.cs @@ -0,0 +1,6 @@ +namespace Newsbot.Collector.Api.Domain.Response; + +public class AuthFailedResponse +{ + public IEnumerable? Errors { get; set; } +} \ No newline at end of file diff --git a/Newsbot.Collector.Api/Domain/Response/AuthSuccessfulResponse.cs b/Newsbot.Collector.Api/Domain/Response/AuthSuccessfulResponse.cs new file mode 100644 index 0000000..48e5009 --- /dev/null +++ b/Newsbot.Collector.Api/Domain/Response/AuthSuccessfulResponse.cs @@ -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; } +} \ No newline at end of file diff --git a/Newsbot.Collector.Api/Domain/Results/AuthenticationResult.cs b/Newsbot.Collector.Api/Domain/Results/AuthenticationResult.cs new file mode 100644 index 0000000..dfbb63b --- /dev/null +++ b/Newsbot.Collector.Api/Domain/Results/AuthenticationResult.cs @@ -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? ErrorMessage { get; set; } +} \ No newline at end of file