last ...
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace xIdentityModels.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Rotate Specified Api Key ...
|
||||
/// </summary>
|
||||
public class XRotateApiKeyRequest
|
||||
{
|
||||
public TimeSpan? NewExpiration { get; set; } = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user