#### [Abblix\.Oidc\.Server](https://www.abblix.com/en/docs/api/abblix-oidc-server 'index')
### [Abblix\.Oidc\.Server\.Features\.ResourceIndicators](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ResourceIndicators 'Abblix\.Oidc\.Server\.Features\.ResourceIndicators')

## ResourceKeysProvider Class

Resolves a protected resource's encryption keys from its registration, inline or at its JWKS URI\.

```csharp
public class ResourceKeysProvider : Abblix.Oidc.Server.Features.ResourceIndicators.IResourceKeysProvider
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → ResourceKeysProvider

Implements [IResourceKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ResourceIndicators.IResourceKeysProvider 'Abblix\.Oidc\.Server\.Features\.ResourceIndicators\.IResourceKeysProvider')
### Constructors

## ResourceKeysProvider\(ILogger\<ResourceKeysProvider\>, IServiceProvider\) Constructor {#Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider.ResourceKeysProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider_,System.IServiceProvider)}

Resolves a protected resource's encryption keys from its registration, inline or at its JWKS URI\.

```csharp
public ResourceKeysProvider(Microsoft.Extensions.Logging.ILogger<Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider> logger, System.IServiceProvider serviceProvider);
```
#### Parameters

###### `logger` [Microsoft\.Extensions\.Logging\.ILogger&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1')[ResourceKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider 'Abblix\.Oidc\.Server\.Features\.ResourceIndicators\.ResourceKeysProvider')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger-1 'Microsoft\.Extensions\.Logging\.ILogger\`1') {#Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider.ResourceKeysProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider_,System.IServiceProvider).logger}

Logger for capturing fetch operations and errors\.

###### `serviceProvider` [System\.IServiceProvider](https://learn.microsoft.com/en-us/dotnet/api/system.iserviceprovider 'System\.IServiceProvider') {#Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider.ResourceKeysProvider(Microsoft.Extensions.Logging.ILogger_Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider_,System.IServiceProvider).serviceProvider}

Used to resolve the scoped [ISecureHttpFetcher](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.SecureHttpFetch.ISecureHttpFetcher 'Abblix\.Oidc\.Server\.Features\.SecureHttpFetch\.ISecureHttpFetcher') per fetch\.
### Methods

## ResourceKeysProvider\.GetEncryptionKeys\(ResourceDefinition\) Method {#Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider.GetEncryptionKeys(Abblix.Oidc.Server.Common.Constants.ResourceDefinition)}

Retrieves the encryption keys published by the given resource\.

```csharp
public System.Collections.Generic.IAsyncEnumerable<Abblix.Jwt.JsonWebKey> GetEncryptionKeys(Abblix.Oidc.Server.Common.Constants.ResourceDefinition definition);
```
#### Parameters

###### `definition` [ResourceDefinition](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Constants.ResourceDefinition 'Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition') {#Abblix.Oidc.Server.Features.ResourceIndicators.ResourceKeysProvider.GetEncryptionKeys(Abblix.Oidc.Server.Common.Constants.ResourceDefinition).definition}

The registered definition of the resource\.

Implements [GetEncryptionKeys\(ResourceDefinition\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.ResourceIndicators.IResourceKeysProvider#Abblix.Oidc.Server.Features.ResourceIndicators.IResourceKeysProvider.GetEncryptionKeys(Abblix.Oidc.Server.Common.Constants.ResourceDefinition) 'Abblix\.Oidc\.Server\.Features\.ResourceIndicators\.IResourceKeysProvider\.GetEncryptionKeys\(Abblix\.Oidc\.Server\.Common\.Constants\.ResourceDefinition\)')

#### Returns
[System\.Collections\.Generic\.IAsyncEnumerable&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.iasyncenumerable-1 'System\.Collections\.Generic\.IAsyncEnumerable\`1')[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.iasyncenumerable-1 'System\.Collections\.Generic\.IAsyncEnumerable\`1')  
The resource's encryption keys, empty when it publishes none, which is how a resource says it
            accepts a signed JWS\.
