Compare commits
3
Commits
4789d6b280
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07e243964f | ||
|
|
0f1d3dadb0 | ||
|
|
295bd12877 |
@@ -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,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; } = [];
|
||||
}
|
||||
}
|
||||
@@ -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