Added more security and metrics
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using EonaCat.Json;
|
||||
|
||||
namespace EonaCat.DoxaApi.Models
|
||||
{
|
||||
@@ -13,64 +13,64 @@ namespace EonaCat.DoxaApi.Models
|
||||
/// </summary>
|
||||
public sealed class SecuritySchemeModel
|
||||
{
|
||||
[JsonPropertyName("id")]
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; } = "";
|
||||
|
||||
/// <summary>apiKey | http | oauth2 | openIdConnect</summary>
|
||||
[JsonPropertyName("type")]
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; } = "apiKey";
|
||||
|
||||
[JsonPropertyName("description")]
|
||||
[JsonProperty("description")]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>For apiKey: header | query | cookie</summary>
|
||||
[JsonPropertyName("in")]
|
||||
[JsonProperty("in")]
|
||||
public string? In { get; set; }
|
||||
|
||||
/// <summary>For apiKey: the header/query/cookie name. For http: ignored.</summary>
|
||||
[JsonPropertyName("name")]
|
||||
[JsonProperty("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>For http: bearer | basic | digest</summary>
|
||||
[JsonPropertyName("scheme")]
|
||||
[JsonProperty("scheme")]
|
||||
public string? Scheme { get; set; }
|
||||
|
||||
/// <summary>For http bearer: an informational hint such as "JWT".</summary>
|
||||
[JsonPropertyName("bearerFormat")]
|
||||
[JsonProperty("bearerFormat")]
|
||||
public string? BearerFormat { get; set; }
|
||||
|
||||
/// <summary>For oauth2: supported flows (clientCredentials, authorizationCode, password, implicit).</summary>
|
||||
[JsonPropertyName("flows")]
|
||||
[JsonProperty("flows")]
|
||||
public OAuthFlowsModel? Flows { get; set; }
|
||||
}
|
||||
|
||||
public sealed class OAuthFlowsModel
|
||||
{
|
||||
[JsonPropertyName("clientCredentials")]
|
||||
[JsonProperty("clientCredentials")]
|
||||
public OAuthFlowModel? ClientCredentials { get; set; }
|
||||
|
||||
[JsonPropertyName("authorizationCode")]
|
||||
[JsonProperty("authorizationCode")]
|
||||
public OAuthFlowModel? AuthorizationCode { get; set; }
|
||||
|
||||
[JsonPropertyName("password")]
|
||||
[JsonProperty("password")]
|
||||
public OAuthFlowModel? Password { get; set; }
|
||||
|
||||
[JsonPropertyName("implicit")]
|
||||
[JsonProperty("implicit")]
|
||||
public OAuthFlowModel? Implicit { get; set; }
|
||||
}
|
||||
|
||||
public sealed class OAuthFlowModel
|
||||
{
|
||||
[JsonPropertyName("authorizationUrl")]
|
||||
[JsonProperty("authorizationUrl")]
|
||||
public string? AuthorizationUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("tokenUrl")]
|
||||
[JsonProperty("tokenUrl")]
|
||||
public string? TokenUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("refreshUrl")]
|
||||
[JsonProperty("refreshUrl")]
|
||||
public string? RefreshUrl { get; set; }
|
||||
|
||||
[JsonPropertyName("scopes")]
|
||||
[JsonProperty("scopes")]
|
||||
public Dictionary<string, string> Scopes { get; set; } = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user