mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-06 23:34:13 +02:00
- Updated launchSettings.json for consistency. - Refactored FileValidationHelper to improve image validation logic. - Enhanced ServerDirectoryService for better connection handling and user count updates. - Improved DatabaseSetup for legacy database handling and seeding default channels. - Refined FirstRunSetup to ensure JWT secret generation. - Removed appsettings.Development.json as it is no longer needed. - Updated EchoHub.Tests project file for consistency. - Added unit tests for FileValidationHelper and PresenceTracker with improved assertions. - Updated ValidationConstantsTests to ensure regex validations are correct. - Cleaned up solution file formatting for better readability.
18 lines
568 B
C#
18 lines
568 B
C#
namespace EchoHub.Core.Models;
|
|
|
|
public class RefreshToken
|
|
{
|
|
public Guid Id { get; set; }
|
|
public required string TokenHash { get; set; }
|
|
public Guid UserId { get; set; }
|
|
public DateTimeOffset ExpiresAt { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
public DateTimeOffset? RevokedAt { get; set; }
|
|
|
|
public bool IsExpired => DateTimeOffset.UtcNow >= ExpiresAt;
|
|
public bool IsRevoked => RevokedAt is not null;
|
|
public bool IsActive => !IsExpired && !IsRevoked;
|
|
|
|
public User? User { get; set; }
|
|
}
|