ya cleanup
This commit is contained in:
parent
76af07e271
commit
3ab92ea9a5
17 changed files with 107 additions and 301 deletions
|
|
@ -87,17 +87,19 @@ internal class Program
|
|||
app
|
||||
.UseRouting()
|
||||
.UseAuthentication()
|
||||
.UseAuthorization().UseCors("default")
|
||||
.UseAuthorization()
|
||||
.UseCors("default")
|
||||
.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapDefaultControllerRoute()
|
||||
.RequireAuthorization();
|
||||
});
|
||||
app.MapIdentityApi<ApplicationUser>().RequireAuthorization("ApiScope");
|
||||
app.MapIdentityApi<ApplicationUser>().RequireAuthorization("ApiScope");
|
||||
|
||||
app.MapGet("/identity", (HttpContext context) =>
|
||||
new JsonResult(context?.User?.Claims.Select(c => new { c.Type, c.Value }))
|
||||
).RequireAuthorization("ApiScope");
|
||||
app.MapGet("/identity", (HttpContext context) =>
|
||||
new JsonResult(context?.User?.Claims.Select(c => new { c.Type, c.Value }))
|
||||
);
|
||||
|
||||
app.UseSession();
|
||||
await app.RunAsync();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue