Exemple #1
0
 public void AddTenant(string name)
 {
     var tenant = new TenantConfiguration { Tenant = name };
     _configurationForTenants.Save(tenant);
     _tenantsCollection.Add(tenant);
     SelectedTenant = tenant;
 }
 dynamic Map(TenantConfiguration configuration)
 {
     return new
     {
         Tenant = configuration.Tenant,
         Client = configuration.Client,
         ClientSecret = configuration.ClientSecret
     };
 }
Exemple #3
0
        public void Save(TenantConfiguration tenantConfiguration)
        {
            if (string.IsNullOrEmpty(tenantConfiguration.AccessToken))
                tenantConfiguration.AccessToken = "[Not Set]";

            if (string.IsNullOrEmpty(tenantConfiguration.RefreshToken))
                tenantConfiguration.RefreshToken = "[Not Set]";

            _configurationForTenants.Save(tenantConfiguration);

            Clients.All.tenantSaved(tenantConfiguration);
        }