Closed xts-velkumars closed 1 year ago
Use RequireAuthorization
on your route definition or on the module in it's constructor and pass in your roles/policies:
app.MapGet("/", () =>
{
return "Hi";
}).RequireAuthorization();
public DirectorsModule() : base("/directors")
{
this.RequireAuthorization();
}
@jchannon, Is there any example how to use "RequiresClaims"
I couldn't find any Extension Method for "RequiresClaims" Carter V7.0.0
Basically, I want to achieve below