Files
xIdentityService/Configuration/XProxyConfiguration.cs
T
2024-01-25 04:44:02 +03:30

81 lines
2.5 KiB
C#

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; }
}
}