public ProtectPaths(RequestDelegate next, ProtectPathsOptions options) { _next = next; _policyName = options.Policy; _excludedPaths = options.Exclusions ?? new List <PathString>(); _accessDeniedPath = options.AccessDeniedPath; }
public static IApplicationBuilder UseProtectPaths(this IApplicationBuilder builder, ProtectPathsOptions options) { return(builder.UseMiddleware <ProtectPaths>(options)); }