Compare commits

..
3 Commits
Author SHA1 Message Date
saherelm 07e243964f last ... 2026-10-08 21:18:58 +03:30
saherelm 0f1d3dadb0 last ... 2026-10-06 17:47:07 +03:30
saherelm 295bd12877 last ... 2026-10-05 22:30:42 +03:30
5 changed files with 55 additions and 1 deletions
+14
View File
@@ -157,6 +157,20 @@ namespace xIdentityModels.Extensions
return result;
}
/// <summary>
/// Validate ...
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public static bool IsValid(this XCreateApiKeyRequest source)
{
//
var result = !source.IsNull();
//
return result;
}
/// <summary>
/// Validate Item for Add or Update ...
/// </summary>
+12
View File
@@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace xIdentityModels.Models
{
public class XApiKeyValidationResult
{
public string OwnerId { get; set; }
public int ApplicationId { get; set; }
public IList<string> Scopes {get; set;} = [];
public IList<string> Errors { get; set; } = [];
}
}
+16
View File
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
namespace xIdentityModels.Models
{
/// <summary>
/// Create Specified Api Key ...
/// </summary>
public class XCreateApiKeyRequest
{
public int? RateLimit {get; set;} = null;
public TimeSpan? Expiration {get; set;} = null;
public IEnumerable<string> Scopes {get; set;} = null;
public IEnumerable<string> AllowedIPs {get; set;} = null;
}
}
+12
View File
@@ -0,0 +1,12 @@
using System;
namespace xIdentityModels.Models
{
/// <summary>
/// Rotate Specified Api Key ...
/// </summary>
public class XRotateApiKeyRequest
{
public TimeSpan? NewExpiration { get; set; } = null;
}
}