Initial Commit ...

This commit is contained in:
2024-01-25 04:44:02 +03:30
commit a8e257b855
36 changed files with 6645 additions and 0 deletions
@@ -0,0 +1,15 @@
using xIdentityService.Constants;
namespace xIdentityService.Configuration {
public partial class XIdentityServiceConfiguration {
public string Authority { get; set; }
public string ApiName { get; set; }
public string ApiSecret { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
public string XPoweredValue { get; set; }
public XTokenType TokenType { get; set; }
public string XRevisionSecretKey { get; set; }
public int DefaultClientTimeout { get; set; } = 360;
}
}
+81
View File
@@ -0,0 +1,81 @@
using System.Collections.Generic;
using xModels.Base;
namespace xIdentityService.Configuration {
/// <summary>
/// XProxy Middleware Configuration ...
/// </summary>
public class XProxyConfiguration {
/// <summary>
/// Proxy Host Address for Clients Which Use XProxy Server ...
/// </summary>
/// <value></value>
public string Host { get; set; }
/// <summary>
/// if EnableXPoweredByAthorization property setted to true, this property determines
/// the header must be this value ...
/// </summary>
/// <value></value>
public string XPoweredValue { get; set; }
/// <summary>
/// Determines Proxy Http Handler Check SSL or not ...
/// </summary>
/// <value></value>
public bool DisableSSLCheck { get; set; }
/// <summary>
/// Determines Http Client Handler Allow Auto Redirect or not ...
/// </summary>
/// <value></value>
public bool AllowAutoRedirect { get; set; }
/// <summary>
/// Determines Proxy Server Log Received Requests or not ...
/// </summary>
/// <value></value>
public bool EnableLogging { get; set; }
/// <summary>
/// DefineRoutes for Handling ...
/// </summary>
/// <value></value>
public HashSet<XProxyRouteDescriptor> Routes { get; set; }
}
/// <summary>
/// Describe a Proxy Route ...
/// </summary>
public class XProxyRouteDescriptor : XBaseDescriptor {
/// <summary>
/// Determines which route can handled for Proxyfing ...
/// </summary>
/// <value></value>
public string Route { get; set; }
/// <summary>
/// Determines Proxy Server Handle Athorization or not ...
/// </summary>
/// <value></value>
public bool EnableAuthorization { get; set; }
/// <summary>
/// Determines Which Scopes allowed to this route if authorizations enabled ...
/// </summary>
/// <value></value>
public HashSet<string> AllowedScopes { get; set; }
/// <summary>
/// Determines Which Roles allowed to this route if authorizations enabled ...
/// </summary>
/// <value></value>
public HashSet<string> AllowedRoles { get; set; }
/// <summary>
/// Determines XProxy Can Check XPowered By Authorization or not ...
/// </summary>
/// <value></value>
public bool EnableXPoweredByAthorization { get; set; }
}
}