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

## EntityStorageKeyFactory Class

Centralized factory for generating entity storage keys with consistent formatting\.
Provides standardized key generation for all OIDC storage entities\.

```csharp
public class EntityStorageKeyFactory : Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory
```

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

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

## EntityStorageKeyFactory\.AuthorizationRequestKey\(Uri\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationRequestKey(System.Uri)}

Generates a storage key for an authorization request by URI\.

```csharp
public string AuthorizationRequestKey(System.Uri requestUri);
```
#### Parameters

###### `requestUri` [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationRequestKey(System.Uri).requestUri}

The pushed authorization request URI\.

Implements [AuthorizationRequestKey\(Uri\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.AuthorizationRequestKey(System.Uri) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.AuthorizationRequestKey\(System\.Uri\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the authorization request\.

## EntityStorageKeyFactory\.AuthorizationValueReuseKey\(string, string, string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationValueReuseKey(string,string,string)}

Generates a storage key for reuse detection of an authorization request value \(a PKCE
`code_challenge` or an OpenID Connect `nonce`\), scoped to a client and the value's kind\.

```csharp
public string AuthorizationValueReuseKey(string clientId, string valueKind, string valueHash);
```
#### Parameters

###### `clientId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationValueReuseKey(string,string,string).clientId}

The client the value belongs to\.

###### `valueKind` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationValueReuseKey(string,string,string).valueKind}

A discriminator for the value's role, so distinct kinds never collide\.

###### `valueHash` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizationValueReuseKey(string,string,string).valueHash}

A hash of the value; the raw value is never part of the key\.

Implements [AuthorizationValueReuseKey\(string, string, string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.AuthorizationValueReuseKey(string,string,string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.AuthorizationValueReuseKey\(string, string, string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the recorded value\.

## EntityStorageKeyFactory\.AuthorizedGrantKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizedGrantKey(string)}

Generates a storage key for an authorized grant by authorization code\.

```csharp
public string AuthorizedGrantKey(string authorizationCode);
```
#### Parameters

###### `authorizationCode` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.AuthorizedGrantKey(string).authorizationCode}

The OAuth 2\.0 authorization code\.

Implements [AuthorizedGrantKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.AuthorizedGrantKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.AuthorizedGrantKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the authorization grant\.

## EntityStorageKeyFactory\.BackChannelAuthenticationRequestKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.BackChannelAuthenticationRequestKey(string)}

Generates a storage key for a backchannel authentication request by request ID\.

```csharp
public string BackChannelAuthenticationRequestKey(string requestId);
```
#### Parameters

###### `requestId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.BackChannelAuthenticationRequestKey(string).requestId}

The CIBA authentication request identifier\.

Implements [BackChannelAuthenticationRequestKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.BackChannelAuthenticationRequestKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.BackChannelAuthenticationRequestKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the backchannel authentication request\.

## EntityStorageKeyFactory\.DeviceAuthorizationRequestKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.DeviceAuthorizationRequestKey(string)}

Generates a storage key for a device authorization request by device code\.

```csharp
public string DeviceAuthorizationRequestKey(string deviceCode);
```
#### Parameters

###### `deviceCode` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.DeviceAuthorizationRequestKey(string).deviceCode}

The device code identifier\.

Implements [DeviceAuthorizationRequestKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.DeviceAuthorizationRequestKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.DeviceAuthorizationRequestKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the device authorization request\.

## EntityStorageKeyFactory\.DeviceAuthorizationUserCodeKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.DeviceAuthorizationUserCodeKey(string)}

Generates a storage key for mapping a user code to its device code\.

```csharp
public string DeviceAuthorizationUserCodeKey(string userCode);
```
#### Parameters

###### `userCode` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.DeviceAuthorizationUserCodeKey(string).userCode}

The user\-friendly verification code\.

Implements [DeviceAuthorizationUserCodeKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.DeviceAuthorizationUserCodeKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.DeviceAuthorizationUserCodeKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the user code mapping\.

## EntityStorageKeyFactory\.IpRateLimitKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.IpRateLimitKey(string)}

Generates a storage key for rate limiting by IP address or client identifier\.

```csharp
public string IpRateLimitKey(string clientIdentifier);
```
#### Parameters

###### `clientIdentifier` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.IpRateLimitKey(string).clientIdentifier}

The client identifier \(typically IP address\)\.

Implements [IpRateLimitKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.IpRateLimitKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.IpRateLimitKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the IP rate limit state\.

## EntityStorageKeyFactory\.JsonWebTokenStatusKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.JsonWebTokenStatusKey(string)}

Generates a storage key for JWT status by JWT ID\.

```csharp
public string JsonWebTokenStatusKey(string jwtId);
```
#### Parameters

###### `jwtId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.JsonWebTokenStatusKey(string).jwtId}

The JSON Web Token identifier\.

Implements [JsonWebTokenStatusKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.JsonWebTokenStatusKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.JsonWebTokenStatusKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the JWT status\.

## EntityStorageKeyFactory\.RegistrationAccessTokenKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.RegistrationAccessTokenKey(string)}

Generates a storage key for the registration access token binding of a client \(RFC 7592\)\.

```csharp
public string RegistrationAccessTokenKey(string clientId);
```
#### Parameters

###### `clientId` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.RegistrationAccessTokenKey(string).clientId}

The identifier of the registered client\.

Implements [RegistrationAccessTokenKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.RegistrationAccessTokenKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.RegistrationAccessTokenKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the client's current registration\-access\-token jti\.

## EntityStorageKeyFactory\.UserCodeRateLimitKey\(string\) Method {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.UserCodeRateLimitKey(string)}

Generates a storage key for rate limiting user code verification attempts\.

```csharp
public string UserCodeRateLimitKey(string userCode);
```
#### Parameters

###### `userCode` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.Storages.EntityStorageKeyFactory.UserCodeRateLimitKey(string).userCode}

The user code being verified\.

Implements [UserCodeRateLimitKey\(string\)](https://www.abblix.com/en/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory#Abblix.Oidc.Server.Features.Storages.IEntityStorageKeyFactory.UserCodeRateLimitKey(string) 'Abblix\.Oidc\.Server\.Features\.Storages\.IEntityStorageKeyFactory\.UserCodeRateLimitKey\(string\)')

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')  
A formatted storage key for the user code rate limit state\.
