Beispiel #1
0
 private static SquidexOptions CreateOptions(ConfiguredApp app)
 {
     return(new SquidexOptions
     {
         AppName = app.Name,
         ClientId = app.ClientId,
         ClientSecret = app.ClientSecret,
         Url = app.ServiceUrl
     });
 }
Beispiel #2
0
        public void Upsert(string config, ConfiguredApp appConfig)
        {
            if (string.IsNullOrWhiteSpace(appConfig.ServiceUrl))
            {
                appConfig.ServiceUrl = CloudUrl;
            }

            configuration.Apps[config] = appConfig;

            if (string.IsNullOrWhiteSpace(configuration.CurrentApp))
            {
                configuration.CurrentApp = config;
            }

            Save();
        }
Beispiel #3
0
        private static SquidexOptions CreateOptions(ConfiguredApp app, bool emulate)
        {
            var options = new SquidexOptions
            {
                AppName      = app.Name,
                ClientId     = app.ClientId,
                ClientSecret = app.ClientSecret,
                Url          = app.ServiceUrl
            };

            if (app.IgnoreSelfSigned)
            {
                options.Configurator = AcceptAllCertificatesConfigurator.Instance;
            }

            if (emulate)
            {
                options.ClientFactory = new GetOnlyHttpClientFactory();
            }

            return(options);
        }