From 882e598b213a8b9b7e60b2e257ebc64db3433955 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Jun 2022 09:09:41 +0200 Subject: [PATCH] Update samples. --- csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs | 3 +++ csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj | 4 ++-- csharp/Sample.Profile/Sample.Profile/Startup.cs | 9 ++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs b/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs index b5b48387..30cfd197 100644 --- a/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs +++ b/csharp/Sample.Blog/Sample.Blog/Models/ApiClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Options; using Squidex.ClientLibrary; +using Squidex.ClientLibrary.Configuration; namespace Sample.Blog.Models { @@ -22,6 +23,8 @@ public ApiClient(IOptions appOptions) { var options = appOptions.Value; + options.Configurator = AcceptAllCertificatesConfigurator.Instance; + var clientManager = new SquidexClientManager(options); diff --git a/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj b/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj index c9e19318..bca87ba0 100644 --- a/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj +++ b/csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj @@ -5,12 +5,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/csharp/Sample.Profile/Sample.Profile/Startup.cs b/csharp/Sample.Profile/Sample.Profile/Startup.cs index 9dac79ee..d1ec9381 100644 --- a/csharp/Sample.Profile/Sample.Profile/Startup.cs +++ b/csharp/Sample.Profile/Sample.Profile/Startup.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Options; using Squidex.ClientLibrary; +using Squidex.ClientLibrary.Configuration; namespace Sample.Profile { @@ -29,7 +30,13 @@ public void ConfigureServices(IServiceCollection services) services.Configure(Configuration.GetSection("app")); services.AddSingleton(c => - new SquidexClientManager(c.GetRequiredService>().Value)); + { + var options = c.GetRequiredService>().Value; + + options.Configurator = AcceptAllCertificatesConfigurator.Instance; + + return new SquidexClientManager(options); + }); services.AddMvc(); }