Add Login Module
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using AMREZ.EOP.Domain.Entities.Common;
|
||||
|
||||
namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class AccessTokenDeny : BaseEntity
|
||||
{
|
||||
public string Jti { get; set; } = default!;
|
||||
public DateTimeOffset ExpiresAt { get; set; }
|
||||
}
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class Permission : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public string Code { get; set; } = default!; // e.g. "auth:session:read"
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
|
||||
18
AMREZ.EOP.Domain/Entities/Authentications/RefreshToken.cs
Normal file
18
AMREZ.EOP.Domain/Entities/Authentications/RefreshToken.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using AMREZ.EOP.Domain.Entities.Common;
|
||||
|
||||
namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class RefreshToken : BaseEntity
|
||||
{
|
||||
public string FamilyId { get; set; } = default!;
|
||||
public string RefreshTokenHash { get; set; } = default!;
|
||||
|
||||
public Guid UserId { get; set; }
|
||||
public Guid SessionId { get; set; }
|
||||
|
||||
public DateTimeOffset ExpiresAt { get; set; }
|
||||
public DateTimeOffset? RevokedAt { get; set; }
|
||||
|
||||
public User User { get; set; } = default!;
|
||||
public UserSession Session { get; set; } = default!;
|
||||
}
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class Role : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public string Code { get; set; } = default!; // system code, unique per tenant
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class RolePermission : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid RoleId { get; set; }
|
||||
public Guid PermissionId { get; set; }
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class User : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
|
||||
public string PasswordHash { get; set; } = default!;
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserExternalAccount : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public ExternalProvider Provider { get; set; }
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserIdentity : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public IdentityType Type { get; set; }
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserMfaFactor : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public MfaType Type { get; set; }
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserPasswordHistory : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public string PasswordHash { get; set; } = default!;
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserRole : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public Guid RoleId { get; set; }
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class UserSession : BaseEntity
|
||||
{
|
||||
public Guid TenantId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
public string RefreshTokenHash { get; set; } = default!;
|
||||
|
||||
Reference in New Issue
Block a user