Files
xIdentityModels/Dtos/XApiKeyDto.cs
T
2026-10-04 22:02:30 +03:30

74 lines
1.8 KiB
C#

using System;
using xModels.Base;
namespace xIdentityModels.Dtos
{
/// <summary>
/// an Specified Api Key ...
/// </summary>
public class XApiKeyDto : XBaseGuidIDEntityDto
{
/// <summary>
/// Related Application Id ...
/// </summary>
public int ApplicationId { get; set; }
/// <summary>
/// Hash ...
/// SHA256 of ApiKey ...
/// </summary>
public string KeyHash { get; set; }
/// <summary>
/// a Prefix ...
/// </summary>
public string KeyPrefix { get; set; }
/// <summary>
/// Expiration Type ...
/// </summary>
public DateTime ExpiresAt { get; set; }
/// <summary>
/// Cration Time ...
/// </summary>
public DateTime CreatedOn { get; set; }
/// <summary>
/// Last Usage Date ...
/// </summary>
public DateTime? LastUsedAt { get; set; }
/// <summary>
/// Revoked Time ...
/// </summary>
public DateTime? RevokedAt { get; set; }
/// <summary>
/// Revoker User Id ...
/// </summary>
public string RevokedBy { get; set; }
/// <summary>
/// a Json Array String ...
/// XApiKeyScope ...
/// </summary>
public string AllowedScopes { get; set; }
/// <summary>
/// a Comma-separated List which Specified White List IP ...
/// </summary>
public string AllowedIPs { get; set; }
/// <summary>
/// Rate Limit Per Minute ...
/// </summary>
public int RateLimitPerMinute { get; set; } = 60;
//
/// <summary>
/// Related Application ...
/// </summary>
public virtual XApplicationDto Application { get; set; }
}
}