WIP PostIt login
This commit is contained in:
parent
18ce58e84a
commit
f3a3b63595
13 changed files with 103 additions and 160 deletions
|
|
@ -32,7 +32,7 @@ internal class Program
|
|||
{
|
||||
policy
|
||||
.RequireAuthenticatedUser()
|
||||
.RequireClaim(JwtClaimTypes.Scope, new string[] { "blog" });
|
||||
.RequireClaim(JwtClaimTypes.Scope, new string[] { "blogs" });
|
||||
});
|
||||
})
|
||||
.AddYavscCors(builder.Configuration)
|
||||
|
|
@ -88,7 +88,7 @@ internal class Program
|
|||
.UseAuthorization()
|
||||
.UseCors("default")
|
||||
;
|
||||
app.MapIdentityApi<ApplicationUser>().RequireAuthorization("blog");
|
||||
app.MapIdentityApi<ApplicationUser>().RequireAuthorization("BlogScope");
|
||||
|
||||
app.MapGet("/identity", (HttpContext context) =>
|
||||
new JsonResult(context?.User?.Claims.Select(c => new { c.Type, c.Value }))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue