How do I register BasicAuthAuthorizationFilter with DashboardOptions.Authorization

How do I register BasicAuthAuthorizationFilter with DashboardOptions.Authorization after DashboardOptions.AuthorizationFilters property is obsolete?
DashboardOptions.Authorization only accepts implementations of IDashboardAuthorizationFilter.

It does not seem like the documentation has been updated yet.

I don’t think you do, at least not directly. IDashboardAuthorizationFilter seems to intentionally not expose its HttpContext.

I think you’ll need to use the AspNetCore or OWIN pipeline that the dashboard is registered in, and add some authz upstream of it. I’ll post details here if I get that working.

Having the same problem regarding the Basic auth.

@CrazyPyro: This decision would make sense, but why haven’t they removed the authorization completely then? I mean you could still configure:

dashboardOptions.Authorization = new[] { new AllowAllAuthorization() };

Have you found a solution yet?

A IDashboardAuthorizationFilter implementation has the ability to get the OWIN context by context.GetOwinEnvironment().

Just added a typical OWIN middleware for the Basic authentication… I’m done with it for the moment.