Add Login Module
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace AMREZ.EOP.Contracts.DTOs.Authentications.IssueTokenPair;
|
||||
|
||||
public sealed class IssueTokenPairRequest
|
||||
{
|
||||
public Guid UserId { get; init; }
|
||||
public string Tenant { get; init; } = default!;
|
||||
public string Email { get; init; } = default!;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Contracts.DTOs.Authentications.IssueTokenPair;
|
||||
|
||||
public sealed class IssueTokenPairResponse
|
||||
{
|
||||
public string AccessToken { get; init; } = default!;
|
||||
public DateTimeOffset AccessExpiresAt { get; init; }
|
||||
public string? RefreshToken { get; init; }
|
||||
public DateTimeOffset? RefreshExpiresAt { get; init; }
|
||||
}
|
||||
@@ -2,7 +2,6 @@ namespace AMREZ.EOP.Contracts.DTOs.Authentications.Login;
|
||||
|
||||
public sealed record LoginResponse(
|
||||
Guid UserId,
|
||||
string DisplayName,
|
||||
string Email,
|
||||
string TenantId
|
||||
);
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Refresh;
|
||||
|
||||
public sealed class RefreshRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// ถ้าไม่ส่งมา จะไปอ่านจาก HttpOnly cookie ชื่อ "refresh_token" ใน Controller
|
||||
/// </summary>
|
||||
public string? RefreshToken { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Refresh;
|
||||
|
||||
public sealed class RefreshResponse
|
||||
{
|
||||
public string AccessToken { get; init; } = default!;
|
||||
public DateTimeOffset AccessExpiresAt { get; init; }
|
||||
public string? RefreshToken { get; init; }
|
||||
public DateTimeOffset? RefreshExpiresAt { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user