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

## ClientIdGenerator Class

Implements the [IClientIdGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.IClientIdGenerator') interface to generate client IDs for OpenID Connect \(OIDC\) clients\.
The generated client IDs are based on cryptographically secure random bytes and are encoded in Base32 format,
providing a URL\-safe, human\-readable identifier\. The length and format of the generated client IDs can be configured
through OIDC options\.

```csharp
public class ClientIdGenerator : Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator
```

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

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

## ClientIdGenerator\(IOptions\<OidcOptions\>\) Constructor {#Abblix.Oidc.Server.Features.RandomGenerators.ClientIdGenerator.ClientIdGenerator(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_)}

Implements the [IClientIdGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.IClientIdGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.IClientIdGenerator') interface to generate client IDs for OpenID Connect \(OIDC\) clients\.
The generated client IDs are based on cryptographically secure random bytes and are encoded in Base32 format,
providing a URL\-safe, human\-readable identifier\. The length and format of the generated client IDs can be configured
through OIDC options\.

```csharp
public ClientIdGenerator(Microsoft.Extensions.Options.IOptions<Abblix.Oidc.Server.Common.Configuration.OidcOptions> options);
```
#### Parameters

###### `options` [Microsoft\.Extensions\.Options\.IOptions&lt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1')[OidcOptions](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions')[&gt;](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.options.ioptions-1 'Microsoft\.Extensions\.Options\.IOptions\`1') {#Abblix.Oidc.Server.Features.RandomGenerators.ClientIdGenerator.ClientIdGenerator(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}
### Methods

## ClientIdGenerator\.GenerateClientId\(\) Method {#Abblix.Oidc.Server.Features.RandomGenerators.ClientIdGenerator.GenerateClientId()}

Generates a new client ID for an OIDC client\. The method produces a random, URL\-safe, and human\-readable
identifier using Base32 encoding, based on the length specified in the OIDC options\. This ensures that the
generated client IDs are suitable for use in various contexts, including web URLs and user interfaces\.

```csharp
public string GenerateClientId();
```

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

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A new, randomly generated client ID string that conforms to the specifications defined in the
            OIDC options\. The client ID is encoded in Base32 format to ensure URL safety and readability\.
