public JumioController(HttpService httpService, IOptions <AppSettings> optionAppSettings, IOptions <JumioSettings> optionjumioSettings) { this.httpService = httpService; this.appSettings = optionAppSettings.Value; this.jumioSettings = optionjumioSettings.Value; SigningCredentials = new Lazy <X509SigningCredentials>(() => { var certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser); certStore.Open(OpenFlags.ReadOnly); var certCollection = certStore.Certificates.Find( X509FindType.FindByThumbprint, appSettings.SigningCertThumbprint, false); if (certCollection.Count > 0) { return(new X509SigningCredentials(certCollection[0])); } throw new Exception("Certificate not found"); }); }
public HttpService(IOptions <AppSettings> optionAppSettings, IOptions <JumioSettings> optionjumioSettings) { this.appSettings = optionAppSettings.Value; this.jumioSettings = optionjumioSettings.Value; }