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

## AuthServiceKeysProviderExtensions Class

Extension helpers for [IAuthServiceKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IAuthServiceKeysProvider')\.

```csharp
public static class AuthServiceKeysProviderExtensions
```

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

## AuthServiceKeysProviderExtensions\.GetPublishedKeysAsync\(this IAuthServiceKeysProvider, ILogger\) Method {#Abblix.Oidc.Server.Common.Interfaces.AuthServiceKeysProviderExtensions.GetPublishedKeysAsync(thisAbblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider,Microsoft.Extensions.Logging.ILogger)}

Builds the public key set published at the JWKS endpoint: the signing public keys marked `use=sig`
and the server's asymmetric encryption public keys marked `use=enc` so a client can encrypt a
request object or other inbound JWE to the server \(RFC 9101\)\. A symmetric server key has no public half
and is omitted; only sanitized public halves are ever published, never private or secret material\.
As a last\-resort guard against a misbehaving key provider, any key still carrying private material is
stripped to its public half before it enters the set and a warning is logged: the JWKS endpoint must
never leak a private key, even if an upstream provider mistakenly returns one\.

```csharp
public static System.Threading.Tasks.Task<Abblix.Jwt.JsonWebKey[]> GetPublishedKeysAsync(this Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider provider, Microsoft.Extensions.Logging.ILogger logger);
```
#### Parameters

###### `provider` [IAuthServiceKeysProvider](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider 'Abblix\.Oidc\.Server\.Common\.Interfaces\.IAuthServiceKeysProvider') {#Abblix.Oidc.Server.Common.Interfaces.AuthServiceKeysProviderExtensions.GetPublishedKeysAsync(thisAbblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider,Microsoft.Extensions.Logging.ILogger).provider}

The provider of the service's signing and encryption keys\.

###### `logger` [Microsoft\.Extensions\.Logging\.ILogger](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger 'Microsoft\.Extensions\.Logging\.ILogger') {#Abblix.Oidc.Server.Common.Interfaces.AuthServiceKeysProviderExtensions.GetPublishedKeysAsync(thisAbblix.Oidc.Server.Common.Interfaces.IAuthServiceKeysProvider,Microsoft.Extensions.Logging.ILogger).logger}

Logger used to warn when a private key is stripped before publication\.

#### Returns
[System\.Threading\.Tasks\.Task&lt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')[JsonWebKey](https://www.abblix.com/en/docs/api/abblix-jwt/Abblix.Jwt.JsonWebKey 'Abblix\.Jwt\.JsonWebKey')[\[\]](https://learn.microsoft.com/en-us/dotnet/api/system.array 'System\.Array')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.task-1 'System\.Threading\.Tasks\.Task\`1')  
The signing keys followed by the asymmetric encryption public keys\.
