#### [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')

## TokenIdGenerator Class

Default [ITokenIdGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.ITokenIdGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.ITokenIdGenerator') implementation\. Draws random bytes from a cryptographically
secure source \([System\.Security\.Cryptography\.RandomNumberGenerator](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.randomnumbergenerator 'System\.Security\.Cryptography\.RandomNumberGenerator') via `CryptoRandom`\)
using the byte count configured in [TokenIdLength](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.TokenIdLength 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.TokenIdLength'), then URL\-safe Base64 encodes
the result so the resulting `jti` value can travel safely through HTTP transports\.

```csharp
public class TokenIdGenerator : Abblix.Oidc.Server.Features.RandomGenerators.ITokenIdGenerator
```

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

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

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

Default [ITokenIdGenerator](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.RandomGenerators.ITokenIdGenerator 'Abblix\.Oidc\.Server\.Features\.RandomGenerators\.ITokenIdGenerator') implementation\. Draws random bytes from a cryptographically
secure source \([System\.Security\.Cryptography\.RandomNumberGenerator](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.randomnumbergenerator 'System\.Security\.Cryptography\.RandomNumberGenerator') via `CryptoRandom`\)
using the byte count configured in [TokenIdLength](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.TokenIdLength 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.TokenIdLength'), then URL\-safe Base64 encodes
the result so the resulting `jti` value can travel safely through HTTP transports\.

```csharp
public TokenIdGenerator(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.TokenIdGenerator.TokenIdGenerator(Microsoft.Extensions.Options.IOptions_Abblix.Oidc.Server.Common.Configuration.OidcOptions_).options}
### Methods

## TokenIdGenerator\.GenerateTokenId\(\) Method {#Abblix.Oidc.Server.Features.RandomGenerators.TokenIdGenerator.GenerateTokenId()}

Produces a new `jti` value from cryptographically secure random bytes, sized per
[TokenIdLength](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Common.Configuration.OidcOptions#Abblix.Oidc.Server.Common.Configuration.OidcOptions.TokenIdLength 'Abblix\.Oidc\.Server\.Common\.Configuration\.OidcOptions\.TokenIdLength') and URL\-safe Base64 encoded\.

```csharp
public string GenerateTokenId();
```

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

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A URL\-safe, randomly generated unique identifier for a JWT\.
