Authentication with policy authorization based on roles

dashboard
Tags: #<Tag:0x00007f7599767fa8>

#1

I have an asp.net core 2.1 application where I configure policies based on roles consisting of Active Directory groups, something similar to

services.AddAuthorization(options =>
{
    options.AddPolicy("AdminGroup", policy =>
    {
        policy.RequireAuthenticatedUser();
        policy.RequireRole("cn=foo,ou=bar,dc=example,dc=com");
    });
});

How can I check in a derived instance of IDashboardAuthorizationFilter for this policy?