Loading ASP.Net Core authorization policy from database : <p>In ASP.Net Core we defined authorization policy in ConfigureServices method as below.</p>

<pre><code>public void ConfigureServices(IServiceCollection services)
{
   services.AddMvc();

   services.AddAuthorization(options =&gt;
   {
        options.AddPolicy("Founders", policy =&gt;
           policy.RequireClaim ("EmployeeNumber", "1", "2", "3", "4", "5"));
   }
 }
</code></pre>

<p>and we use it on controller action as below.</p>

<pre><code>[Authorize("Founders")]
public IActionResult GenerateReport()
{
   return View();
}
</code></pre>

<p>This is all fine and works perfectly. Now my question is, instead of defining "Founders" policy in code (using AddPolicy method in above snippet) how can I add policy details (name,claimtype, value) from database? Is there any hook provided in framework which I can use to populate policies from database?</p>

<p>Idea here is I should be able to add new Employee numbers to list (in database) and policy should be evaluated against that list. Obliviously I can pull this list from database in ConfigureServices itself however any new addition to employee list will not be picked up until application is restarted. Any pointers around this highly appreciated.  </p>
