public KeyVaultCertificateStore( IConfiguration configuration, IOptions <KeyVaultStoreOptions> options) { _configuration = configuration; _options = options.Value; }
public TenantResolver( IOptions <KeyVaultStoreOptions> options, IServiceProvider serviceProvider, ITenantStore tenantStore, ILogger <TenantResolver> logger) { _options = options.Value; _serviceProvider = serviceProvider; _tenantStore = tenantStore; _logger = logger; }
public KeyVaultECDsaKeyStore( IAzureKeyVaultClients azureKeyVaultClients, IMemoryCache memoryCache, IOptions <KeyVaultStoreOptions> options, ILogger <KeyVaultECDsaKeyStore> logger) { _azureKeyVaultClients = azureKeyVaultClients; _memoryCache = memoryCache; _options = options.Value; _lock = new TimedLock(); _logger = logger; }
public async Task <IJwksDiscovery> GetJwksDisoveryAsync(string tenantId) { if (!await IsTenantValidAsync(tenantId)) { throw new Exception($"Invalid Tenant({tenantId}"); } var keyVaultECDsaKeyStore = _serviceProvider.GetRequiredService <KeyVaultECDsaKeyStore>(); var configuration = keyVaultECDsaKeyStore as IKeyVaultECDsaKeyStoreConfiguration; KeyVaultStoreOptions options = (KeyVaultStoreOptions)_options.Clone(); options.KeyIdentifier = string.Format(_options.KeyIdentifier, tenantId); configuration.SetOptions(options); return(keyVaultECDsaKeyStore as IJwksDiscovery); }