From 88c8480911e74af7021b17fdf251686263dde439 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sat, 15 Oct 2022 18:25:40 +0100 Subject: [PATCH] A valid registration page Index --- src/isnd/Startup.cs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/isnd/Startup.cs b/src/isnd/Startup.cs index 72cfaec..eeb891e 100644 --- a/src/isnd/Startup.cs +++ b/src/isnd/Startup.cs @@ -22,6 +22,8 @@ namespace isnd { public class Startup { + public static string ExternalAddress { get; internal set; } + public Startup(IConfiguration config) { Configuration = config; @@ -80,25 +82,19 @@ namespace isnd throw new System.Exception("No unleash client ClientApiKey"); return s.GetRequiredService().CreateUnleahClient(config.Value); }); + services.AddAuthentication("Bearer") .AddJwtBearer("Bearer", options => { - options.Authority = "https://localhost:5001"; - + options.Authority = ExternalAddress; options.TokenValidationParameters = new TokenValidationParameters { ValidateAudience = false }; }); - } - - public static IUnleash UnleashClient { get; private set; } - public static string ExternalAddress { get; internal set; } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, Microsoft.AspNetCore.Hosting.IHostingEnvironment env,