diff --git a/Extensions/XModelExtensions.cs b/Extensions/XModelExtensions.cs index 5d55da1..b1504ee 100644 --- a/Extensions/XModelExtensions.cs +++ b/Extensions/XModelExtensions.cs @@ -157,6 +157,20 @@ namespace xIdentityModels.Extensions return result; } + /// + /// Validate ... + /// + /// + /// + public static bool IsValid(this XCreateApiKeyRequest source) + { + // + var result = !source.IsNull(); + + // + return result; + } + /// /// Validate Item for Add or Update ... /// diff --git a/Models/XCreateApiKeyRequest.cs b/Models/XCreateApiKeyRequest.cs new file mode 100644 index 0000000..b8e081d --- /dev/null +++ b/Models/XCreateApiKeyRequest.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +namespace xIdentityModels.Models +{ + /// + /// Create Specified Api Key ... + /// + public class XCreateApiKeyRequest + { + public int? RateLimit {get; set;} = null; + public TimeSpan? Expiration {get; set;} = null; + public IEnumerable Scopes {get; set;} = null; + public IEnumerable AllowedIPs {get; set;} = null; + } +} \ No newline at end of file diff --git a/Models/XRotateApiKeyRequest.cs b/Models/XRotateApiKeyRequest.cs new file mode 100644 index 0000000..e01b8dc --- /dev/null +++ b/Models/XRotateApiKeyRequest.cs @@ -0,0 +1,12 @@ +using System; + +namespace xIdentityModels.Models +{ + /// + /// Rotate Specified Api Key ... + /// + public class XRotateApiKeyRequest + { + public TimeSpan? NewExpiration { get; set; } = null; + } +} \ No newline at end of file