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

## ClientCredentialFactory Class

Coordinates credential generation by composing ID generation, secret generation, hashing, and expiration calculation\.
Uses SHA\-512 for strong cryptographic hashing while maintaining configurable secret length and expiration policies\.

```csharp
public class ClientCredentialFactory : Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IClientCredentialFactory
```

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

Implements [IClientCredentialFactory](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IClientCredentialFactory 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IClientCredentialFactory')
### Constructors

## ClientCredentialFactory\(IClientIdGenerator, IClientSecretGenerator, IHashService, NewClientOptions, TimeProvider\) Constructor {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider)}

Coordinates credential generation by composing ID generation, secret generation, hashing, and expiration calculation\.
Uses SHA\-512 for strong cryptographic hashing while maintaining configurable secret length and expiration policies\.

```csharp
public ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator clientIdGenerator, Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator clientSecretGenerator, Abblix.Oidc.Server.Features.Hashing.IHashService hashService, Abblix.Oidc.Server.Common.Configuration.NewClientOptions options, System.TimeProvider clock);
```
#### Parameters

###### `clientIdGenerator` [IClientIdGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.IClientIdGenerator') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider).clientIdGenerator}

###### `clientSecretGenerator` [IClientSecretGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.IClientSecretGenerator') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider).clientSecretGenerator}

###### `hashService` [IHashService](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Hashing.IHashService 'Abblix\.Oidc\.Server\.Features\.Hashing\.IHashService') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider).hashService}

###### `options` [NewClientOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.NewClientOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.NewClientOptions') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider).options}

###### `clock` [System\.TimeProvider](https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider 'System\.TimeProvider') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.ClientCredentialFactory(Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator,Abblix.Oidc.Server.Features.RandomGenerators.IClientSecretGenerator,Abblix.Oidc.Server.Features.Hashing.IHashService,Abblix.Oidc.Server.Common.Configuration.NewClientOptions,System.TimeProvider).clock}
### Methods

## ClientCredentialFactory\.Create\(string, string\) Method {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.Create(string,string)}

Generates secrets conditionally based on authentication method to avoid unnecessary secret generation
for public clients\. Uses time\-based expiration to enforce secret rotation policies\.
SHA\-512 provides cryptographic strength while remaining compatible with HMAC\-based client\_secret\_jwt\.

```csharp
public Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.ClientCredentials Create(string tokenEndpointAuthMethod, string? clientId=null);
```
#### Parameters

###### `tokenEndpointAuthMethod` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.Create(string,string).tokenEndpointAuthMethod}

Determines whether secret generation is required\.

###### `clientId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.ClientCredentialFactory.Create(string,string).clientId}

Allows external client ID assignment for pre\-registration scenarios\.

Implements [Create\(string, string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IClientCredentialFactory#Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.IClientCredentialFactory.Create(string,string) 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.IClientCredentialFactory\.Create\(string, string\)')

#### Returns
[ClientCredentials](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Endpoints.DynamicClientManagement.Interfaces.ClientCredentials 'Abblix\.Oidc\.Server\.Endpoints\.DynamicClientManagement\.Interfaces\.ClientCredentials')  
Credentials containing both plain\-text \(for transmission\) and hashed \(for storage\) secret formats,
along with calculated expiration timestamp\.
