Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
1.7 kB
2
Indexable
Never
var demoDummyUrl = Core.Entities.Constants.DemoDummyUrl;

var provisioningDefaultSapConfig = new ProvisioningSapConfig { AuthenticationType = string.Empty, CallbackPath = demoDummyUrl, DeviceInstallRelativePath = demoDummyUrl, DeviceSwapRelativePath = demoDummyUrl, DeviceUninstallRelativePath = demoDummyUrl, SapBaseAddress = demoDummyUrl, ServiceBusAddress = demoDummyUrl, ServiceLevelUpdateToSapPath = demoDummyUrl, SiteSwapRelativePath = string.Empty, Disabled = true };2

var provisioningSapConfig = await this.configurationHandler.GetConfigurationOrDefaultAsync(ConfigurationConstants.ProvisioningSapConfig, provisioningDefaultSapConfig).ConfigureAwait(false);



i have a configuration file named as configuration constants which has code line
public static readonly string ProvisioningSapConfig = DataStoreConfigurationPrefix + "Provisioning.SAP.Config";
but here in our code we have to write as public static readonly string ClientSecret = SecretConfigurationPrefix + "SAPClientSecretKey";
SAPClientSecretKey is the keyvault variable in azure which will have the ClientSecretKey

similar line we need to add in configuration contsants file so we can fetch using ConfigurationsConstants.ProvisioningSapConfig.

Also this GetConfigurationOrDefaultAsync accepts two paramtere Task<T> GetConfigurationOrDefaultAsync<T>(string key, T defaultValue); 

write similar for mdmConfig but also in our code we have to store both the Api url (one of telematics data collection and one of privacyMode) and we also have to store username and password in the keyvaults so for those these changes needed to be done . 

Make these changes accordingly with respective to our code which was written.
Leave a Comment