feat(auth): add Redis authorization caching
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Text.Json;
|
||||
using Tiku.Domain.Common;
|
||||
using Tiku.Domain.Tenancy;
|
||||
|
||||
namespace Tiku.Domain.Operations;
|
||||
|
||||
@@ -139,6 +140,26 @@ public sealed class PlatformBackendUserRole : Entity
|
||||
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
||||
}
|
||||
|
||||
public sealed class AuthorizationScopeVersion : AuditableEntity
|
||||
{
|
||||
public AuthRealm Realm { get; set; }
|
||||
public Guid? TenantId { get; set; }
|
||||
public long Version { get; set; } = 1;
|
||||
}
|
||||
|
||||
public sealed class AuthorizationCacheInvalidation : AuditableEntity
|
||||
{
|
||||
public string TargetType { get; set; } = string.Empty;
|
||||
public Guid? TenantId { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public Guid? SessionId { get; set; }
|
||||
public AuthRealm? Realm { get; set; }
|
||||
public long? Version { get; set; }
|
||||
public DateTimeOffset? ProcessedAt { get; set; }
|
||||
public int AttemptCount { get; set; }
|
||||
public string? LastError { get; set; }
|
||||
}
|
||||
|
||||
public sealed class BackgroundJob : AuditableTenantEntity
|
||||
{
|
||||
public string JobType { get; set; } = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user