From f2de84b6d816ba680a33cac998d1170e3a43183b Mon Sep 17 00:00:00 2001 From: ignatandrei Date: Tue, 28 Apr 2020 20:12:28 +0300 Subject: [PATCH] no authorization yet --- .../TestBlocklyHtml/Startup.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/NetCore2Blockly/TestBlocklyHtml/Startup.cs b/src/NetCore2Blockly/TestBlocklyHtml/Startup.cs index 458b42c..bb05b37 100644 --- a/src/NetCore2Blockly/TestBlocklyHtml/Startup.cs +++ b/src/NetCore2Blockly/TestBlocklyHtml/Startup.cs @@ -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. @@ -85,7 +85,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env) app.UseRouting(); - app.UseAuthorization(); + //app.UseAuthorization(); app.UseEndpoints(endpoints => {