diff --git a/cli/Squidex.CLI/Squidex.CLI/Commands/App_Config.cs b/cli/Squidex.CLI/Squidex.CLI/Commands/App_Config.cs
index eb0da5cc..e8a98e8b 100644
--- a/cli/Squidex.CLI/Squidex.CLI/Commands/App_Config.cs
+++ b/cli/Squidex.CLI/Squidex.CLI/Commands/App_Config.cs
@@ -149,6 +149,9 @@ public sealed class AddArguments : IArgumentModel
[Option(LongName = "create", ShortName = "c", Description = "Create the app if it does not exist (needs admin client)")]
public bool Create { get; set; }
+ [Option(LongName = "ignore-self-signed", ShortName = "i", Description = "Ignores self signed certificates")]
+ public bool IgnoreSelfSigned { get; set; }
+
public string ToEntryName()
{
return !string.IsNullOrWhiteSpace(Label) ? Label : Name;
@@ -161,6 +164,7 @@ public ConfiguredApp ToModel()
Name = Name,
ClientId = ClientId,
ClientSecret = ClientSecret,
+ IgnoreSelfSigned = IgnoreSelfSigned,
ServiceUrl = ServiceUrl
};
}
diff --git a/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfigurationService.cs b/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfigurationService.cs
index 024c7182..5c86511e 100644
--- a/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfigurationService.cs
+++ b/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfigurationService.cs
@@ -11,6 +11,7 @@
using Newtonsoft.Json;
using Squidex.CLI.Commands.Implementation;
using Squidex.ClientLibrary;
+using Squidex.ClientLibrary.Configuration;
namespace Squidex.CLI.Configuration
{
@@ -162,13 +163,20 @@ public ISession StartSession()
private static SquidexOptions CreateOptions(ConfiguredApp app)
{
- return new SquidexOptions
+ var options = new SquidexOptions
{
AppName = app.Name,
ClientId = app.ClientId,
ClientSecret = app.ClientSecret,
Url = app.ServiceUrl
};
+
+ if (app.IgnoreSelfSigned)
+ {
+ options.Configurator = AcceptAllCertificatesConfigurator.Instance;
+ }
+
+ return options;
}
public Configuration GetConfiguration()
diff --git a/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfiguredApp.cs b/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfiguredApp.cs
index d8e0fa3a..a9ed2b59 100644
--- a/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfiguredApp.cs
+++ b/cli/Squidex.CLI/Squidex.CLI/Configuration/ConfiguredApp.cs
@@ -16,5 +16,7 @@ public sealed class ConfiguredApp
public string ClientSecret { get; set; }
public string Name { get; set; }
+
+ public bool IgnoreSelfSigned { get; set; }
}
}
diff --git a/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj b/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj
index 1008c0d2..0f69bc16 100644
--- a/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj
+++ b/cli/Squidex.CLI/Squidex.CLI/Squidex.CLI.csproj
@@ -14,7 +14,7 @@
net5.0
true
sq
- 7.1
+ 7.2