Skip to content

Commit

Permalink
no authorization yet
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Apr 28, 2020
1 parent 7a17570 commit f2de84b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/NetCore2Blockly/TestBlocklyHtml/Startup.cs
Expand Up @@ -47,18 +47,18 @@ public void ConfigureServices(IServiceCollection services)
});
});

var key = Encoding.ASCII.GetBytes(Configuration["ApplicationSecret"]);
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuerSigningKey = true,
IssuerSigningKey = new SymmetricSecurityKey(key),
ValidateIssuer = false,
ValidateAudience = false
};
});
//var key = Encoding.ASCII.GetBytes(Configuration["ApplicationSecret"]);
//services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
// .AddJwtBearer(options =>
// {
// options.TokenValidationParameters = new TokenValidationParameters
// {
// ValidateIssuerSigningKey = true,
// IssuerSigningKey = new SymmetricSecurityKey(key),
// ValidateIssuer = false,
// ValidateAudience = false
// };
// });
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand All @@ -85,7 +85,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)

app.UseRouting();

app.UseAuthorization();
//app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
Expand Down

0 comments on commit f2de84b

Please sign in to comment.