mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-25 13:33:10 +00:00
Removes the dummy data
This commit is contained in:
@@ -34,6 +34,15 @@ namespace OidcSamples.TrafficPoliceApi
|
||||
{
|
||||
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap["sub"] = "sub";
|
||||
|
||||
services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy(name: "Default",
|
||||
builder =>
|
||||
{
|
||||
builder.AllowAnyHeader().AllowAnyOrigin().AllowAnyMethod();
|
||||
});
|
||||
});
|
||||
|
||||
services.AddDbContext<ApplicationDbContext>(options =>
|
||||
options.UseNpgsql(Configuration.GetConnectionString("DefaultConnection"))
|
||||
.UseSnakeCaseNamingConvention()
|
||||
@@ -87,6 +96,8 @@ namespace OidcSamples.TrafficPoliceApi
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseCors("Default");
|
||||
|
||||
// 2. Enable authentication middleware
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
Reference in New Issue
Block a user