Merge branch 'video/57_Definicion_Interface_Identity' into dev
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
using CleanArchitecture.Application.Models.Identity;
|
||||||
|
|
||||||
|
namespace CleanArchitecture.Application.Contracts.Identity
|
||||||
|
{
|
||||||
|
public interface IAuthService
|
||||||
|
{
|
||||||
|
Task<AuthResponse> Login(AuthRequest request);
|
||||||
|
Task<RegistrationResponse> Register(RegistrationRequest request);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
namespace CleanArchitecture.Application.Models.Identity
|
||||||
|
{
|
||||||
|
public class AuthRequest
|
||||||
|
{
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace CleanArchitecture.Application.Models.Identity
|
||||||
|
{
|
||||||
|
public class AuthResponse
|
||||||
|
{
|
||||||
|
public string Id { get; set; } = string.Empty;
|
||||||
|
public string Username { get; set; } = string.Empty;
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
public string Token { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
namespace CleanArchitecture.Application.Models.Identity
|
||||||
|
{
|
||||||
|
public class JwtSettings
|
||||||
|
{
|
||||||
|
public string Key { get; set; } = string.Empty;
|
||||||
|
public string Issuer { get; set; } = string.Empty;
|
||||||
|
public string Audience { get; set; } = string.Empty;
|
||||||
|
public double DuracionInMinutes { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
namespace CleanArchitecture.Application.Models.Identity
|
||||||
|
{
|
||||||
|
public class RegistrationRequest
|
||||||
|
{
|
||||||
|
public string Nombre { get; set; } = string.Empty;
|
||||||
|
public string Apellidos { get; set; } = string.Empty;
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
public string Username { get; set; } = string.Empty;
|
||||||
|
public string Password { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
namespace CleanArchitecture.Application.Models.Identity
|
||||||
|
{
|
||||||
|
public class RegistrationResponse
|
||||||
|
{
|
||||||
|
public string UserId { get; set; } = string.Empty;
|
||||||
|
public string Username { get; set; } = string.Empty;
|
||||||
|
public string Email { get; set; } = string.Empty;
|
||||||
|
public string Token { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user