Table of Contents

Class PasswordResetToken

Namespace
KadicAuth.Domain.Entities
Assembly
KadicAuth.Domain.dll
public class PasswordResetToken
Inheritance
object
PasswordResetToken

Constructors

PasswordResetToken(Guid, Guid, Guid, Guid?, string, DateTime)

public PasswordResetToken(Guid id, Guid userId, Guid tenantId, Guid? tenantBranchId, string tokenHash, DateTime expiresAt)

Parameters

id Guid
userId Guid
tenantId Guid
tenantBranchId Guid?
tokenHash string
expiresAt DateTime

Properties

CreatedAt

public DateTime CreatedAt { get; }

Property Value

DateTime

ExpiresAt

public DateTime ExpiresAt { get; }

Property Value

DateTime

Id

public Guid Id { get; }

Property Value

Guid

Tenant

public Tenant? Tenant { get; set; }

Property Value

Tenant

TenantBranch

public TenantBranch? TenantBranch { get; set; }

Property Value

TenantBranch

TenantBranchId

public Guid? TenantBranchId { get; }

Property Value

Guid?

TenantId

public Guid TenantId { get; }

Property Value

Guid

TokenHash

public string TokenHash { get; }

Property Value

string

UsedAt

public DateTime? UsedAt { get; }

Property Value

DateTime?

User

public User? User { get; set; }

Property Value

User

UserId

public Guid UserId { get; }

Property Value

Guid

Methods

Create(Guid, Guid, Guid?, string, DateTime)

public static PasswordResetToken Create(Guid userId, Guid tenantId, Guid? tenantBranchId, string tokenHash, DateTime expiresAt)

Parameters

userId Guid
tenantId Guid
tenantBranchId Guid?
tokenHash string
expiresAt DateTime

Returns

PasswordResetToken

IsActive()

public bool IsActive()

Returns

bool

MarkUsed()

public void MarkUsed()