Clenup old A&A stuff...
parent
a47ced724c
commit
aebf5e1390
|
@ -6,7 +6,6 @@ using System.Linq;
|
||||||
namespace ln.http
|
namespace ln.http
|
||||||
{
|
{
|
||||||
public delegate bool HttpRouterDelegate(HttpContext context);
|
public delegate bool HttpRouterDelegate(HttpContext context);
|
||||||
public delegate bool HttpAuthenticationDelegate(HttpContext httpContext, out HttpPrincipal principal);
|
|
||||||
public delegate bool HttpAuthorizationDelegate(HttpContext httpContext);
|
public delegate bool HttpAuthorizationDelegate(HttpContext httpContext);
|
||||||
public delegate void HttpFilterDelegate(HttpContext httpContext);
|
public delegate void HttpFilterDelegate(HttpContext httpContext);
|
||||||
|
|
||||||
|
@ -16,7 +15,6 @@ namespace ln.http
|
||||||
public class HttpRouter : IDisposable
|
public class HttpRouter : IDisposable
|
||||||
{
|
{
|
||||||
public event HttpFilterDelegate HttpFilters;
|
public event HttpFilterDelegate HttpFilters;
|
||||||
public event HttpAuthenticationDelegate AuthenticationDelegates;
|
|
||||||
|
|
||||||
private List<HttpMapping>[] _mappings = new List<HttpMapping>[5];
|
private List<HttpMapping>[] _mappings = new List<HttpMapping>[5];
|
||||||
private HttpServer _httpServer;
|
private HttpServer _httpServer;
|
||||||
|
@ -47,15 +45,6 @@ namespace ln.http
|
||||||
public bool Route(HttpContext httpContext)
|
public bool Route(HttpContext httpContext)
|
||||||
{
|
{
|
||||||
string residual = "";
|
string residual = "";
|
||||||
|
|
||||||
if (AuthenticationDelegates is not null)
|
|
||||||
{
|
|
||||||
foreach (HttpAuthenticationDelegate authenticationDelegate in AuthenticationDelegates.GetInvocationList())
|
|
||||||
{
|
|
||||||
if (httpContext.Authenticate(authenticationDelegate))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HttpFilters?.Invoke(httpContext);
|
HttpFilters?.Invoke(httpContext);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue