public void Configure(IWebHostBuilder builder) => builder //.ConfigureServices(services => services.AddSingleton<ICacheClient>(new MemoryCacheClient())) .ConfigureAppHost(appHost => { var appSettings = appHost.AppSettings; appHost.Plugins.Add(new AuthFeature(() => new CustomUserSession(), new IAuthProvider[] { new JwtAuthProvider(appSettings) { AuthKeyBase64 = appSettings.GetString("AuthKeyBase64") ?? "cARl12kvS/Ra4moVBIaVsrWwTpXYuZ0mZf/gNLUhDW5=", }, new CredentialsAuthProvider(appSettings), /* Sign In with Username / Password credentials */ new FacebookAuthProvider(appSettings), /* Create App https://developers.facebook.com/apps */ new GoogleAuthProvider(appSettings), /* Create App https://console.developers.google.com/apis/credentials */ new MicrosoftGraphAuthProvider(appSettings), /* Create App https://apps.dev.microsoft.com */ }) { IncludeDefaultLogin = false }); appHost.Plugins.Add(new RegistrationFeature()); //Enable /register Service //override the default registration validation with your own custom implementation appHost.RegisterAs <CustomRegistrationValidator, IValidator <Register> >(); });
public void Configure(IWebHostBuilder builder) => builder .ConfigureAppHost(appHost => { appHost.CustomErrorHttpHandlers[HttpStatusCode.NotFound] = new RazorHandler("/notfound"); appHost.CustomErrorHttpHandlers[HttpStatusCode.Forbidden] = new RazorHandler("/forbidden"); Svg.Load(appHost.RootDirectory.GetDirectory("/assets/svg")); Svg.CssFillColor["svg-icons"] = "#343a40"; });
public void Configure(IWebHostBuilder builder) => builder .ConfigureAppHost(appHost => { // if wwwroot/ is empty, build Client App with 'npm run build' var svgDir = appHost.RootDirectory.GetDirectory("/svg") ?? appHost.ContentRootDirectory.GetDirectory("/public/svg"); if (svgDir != null) { Svg.Load(svgDir); } });
public void Configure(IWebHostBuilder builder) => builder .ConfigureAppHost(appHost => { Svg.Load(appHost.RootDirectory.GetDirectory("/assets/svg")); Svg.CssFillColor["svg-icons"] = "#E91E63"; });
public void Configure(IWebHostBuilder builder) => builder .ConfigureAppHost(appHost => { appHost.Plugins.Add(new OpenApiFeature()); });
public void Configure(IWebHostBuilder builder) => builder .ConfigureAppHost(appHost => { Svg.Load(appHost.RootDirectory.GetDirectory("/assets/svg")); });