Ive implemented IDashboardAuthorizationFilter interface like this:
public bool Authorize(Dashboard context)
{
var owinContext = new OwinContext(context.GetOwinEnviroment());
return owinContext.Authentication.User.Identity.IsAuthenticated;
}
and in the Startup.cs:
app.UseHangFireDashboard("/hangfire", new DashboardOptions {
Authorization = new [] {new AuthorizationFilter()}
});
but the Server.User property in the owinContext is null.