Table of Contents

Class RefreshToken

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

Constructors

RefreshToken(Guid, Guid, Guid, Guid, string, DateTime)

public RefreshToken(Guid id, Guid userId, Guid tenantId, Guid sessionId, string tokenHash, DateTime expiresAt)

Parameters

id Guid
userId Guid
tenantId Guid
sessionId 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

RevokedAt

public DateTime? RevokedAt { get; }

Property Value

DateTime?

Session

public UserSession? Session { get; set; }

Property Value

UserSession

SessionId

public Guid SessionId { get; }

Property Value

Guid

Tenant

public Tenant? Tenant { get; set; }

Property Value

Tenant

TenantId

public Guid TenantId { get; }

Property Value

Guid

TokenHash

public string TokenHash { get; }

Property Value

string

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 RefreshToken Create(Guid userId, Guid tenantId, Guid sessionId, string tokenHash, DateTime expiresAt)

Parameters

userId Guid
tenantId Guid
sessionId Guid
tokenHash string
expiresAt DateTime

Returns

RefreshToken

IsValid()

public bool IsValid()

Returns

bool

Revoke()

public void Revoke()