示例#1
0
 private static SquidexOptions CreateOptions(ConfiguredApp app)
 {
     return(new SquidexOptions
     {
         AppName = app.Name,
         ClientId = app.ClientId,
         ClientSecret = app.ClientSecret,
         Url = app.ServiceUrl
     });
 }
示例#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();
        }
示例#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);
        }