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

## TenantServiceKeys Class

The keys a host registers its own store or budget under, for the server to keep each tenant's part of it apart\.

```csharp
public static class TenantServiceKeys
```

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

### Remarks
A host substitutes its own storage, replay cache or rate limiters under these keys, before or after registering the
server\. The server keeps each tenant's replay records and budgets apart over what is registered there, and
replacing the replay cache or a limiter the server resolves instead is refused at startup\. The stores key every
entity by its tenant themselves, so a storage put in place of the one the server resolves still keeps the tenants
apart, but it is not measured: register it under [Shared](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys#Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys.Shared 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantServiceKeys\.Shared') to keep the storage's metrics\.
### Fields

## TenantServiceKeys\.Shared Field {#Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys.Shared}

The key of the store every tenant's data is kept in, each tenant's under keys of its own: an
`IEntityStorage` or an `IReplayCache`\.

```csharp
public const string Shared = "Abblix.Oidc.Server.Shared";
```

#### Field Value
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
### Methods

## TenantServiceKeys\.PerTenant\(string\) Method {#Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys.PerTenant(string)}

The key of the limiter that spends one tenant's [budget](https://www.abblix.com/docs/api/abblix-oidc-server/Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys#Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys.PerTenant(string).budget 'Abblix\.Oidc\.Server\.Features\.MultiTenancy\.TenantServiceKeys\.PerTenant\(string\)\.budget'), resolved once for each tenant, so
it is registered with a factory or a type that builds a new limiter every time\.

```csharp
public static string PerTenant(string budget);
```
#### Parameters

###### `budget` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Features.MultiTenancy.TenantServiceKeys.PerTenant(string).budget}

The budget, as `CallerRateLimiters` names it\.

#### Returns
[System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String')
