WIP audiences
This commit is contained in:
parent
9846210fd6
commit
f3bb039d2f
15 changed files with 102 additions and 82 deletions
|
|
@ -83,7 +83,7 @@ namespace Yavsc.Blogs.Controllers
|
|||
return new StatusCodeResult(StatusCodes.Status204NoContent);
|
||||
}
|
||||
|
||||
// POST: api/BlogApi
|
||||
// POST: api/v1/blog
|
||||
[HttpPost]
|
||||
public IActionResult PostBlog([FromBody] Models.Blog.BlogPost blog)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ internal class Program
|
|||
.AddYavscCors(builder.Configuration)
|
||||
.AddControllers();
|
||||
String authority = builder.Configuration.GetValue<string>("Site:Authority");
|
||||
String audience = builder.Configuration.GetValue<string>("Site:Audience");
|
||||
|
||||
if (string.IsNullOrEmpty(authority))
|
||||
{
|
||||
throw new Exception("Site:Authority is not configured in appsettings.json");
|
||||
|
|
@ -100,7 +100,7 @@ internal class Program
|
|||
.UseCors("default")
|
||||
;
|
||||
app.Services.GetRequiredService<ILoggerFactory>().CreateLogger("Program")
|
||||
.LogInformation($"Yavsc.Blogs started, Authority is '{authority}', Audience is '{audience}'");
|
||||
.LogInformation($"Yavsc.Blogs started, Authority is '{authority}''");
|
||||
app.MapControllers();
|
||||
app.MapIdentityApi<ApplicationUser>().RequireAuthorization("BlogScope")
|
||||
.WithHttpLogging(Microsoft.AspNetCore.HttpLogging.HttpLoggingFields.All)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"Description": "A collection of blogs about software development, technology, and programming.",
|
||||
"Keywords": "software development, technology, programming, coding, blogs",
|
||||
"Authority": "https://localhost:5001",
|
||||
"Audience": ["blogs"],
|
||||
"CorsAllowedOrigins": [
|
||||
"https://localhost:5005"
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue