Example #1
0
        public Startup(IHostingEnvironment env, IConfiguration configuration)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true, reloadOnChange: true)
                          .AddConfiguration(configuration)
                          .AddEnvironmentVariables();

            CredentialUtil.Load("./wwwroot/ebay-config.yaml");

            Configuration = builder.Build();
        }
Example #2
0
        public LoginPage()
        {
            this.InitializeComponent();
            this.ProtectData();
            try
            {
                string configName = "ebay-config.yaml";
                System.Diagnostics.Debug.WriteLine("Adding access control entry for " + configName);

                CredentialUtil.Load("C:\\Users\\15049\\Documents\\GitHub\\eBayZoom\\eBayZoom\\ebay-config.yaml");
                System.Diagnostics.Debug.WriteLine("Config successfully loaded.");
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine("Error, program settings unable to be read. Thrown: " + e.Message);
            }
            FillScopes();
            //appToken = AuthAPI.GetApplicationToken(environment, scopes);
            //AuthURL = AuthAPI.GenerateUserAuthorizationUrl(environment, scopes, appToken.AccessToken.Token);
        }