Skip to content

ITenantClientRegistrationStore Interface

Keeps the clients dynamic client registration adds (RFC 7591), for a host that keeps them itself, each with the identifier of the registration access token that manages it (RFC 7592).

C#
public interface ITenantClientRegistrationStore

Remarks

Every call names the tenant of the request, and a registration is kept and found under that tenant's Id and Generation together: a registration made at one tenant is never found at another, and a tenant created again under an id finds none of the registrations made at the creation before it. The server names a client by its id exactly and takes a registration found under another spelling of the id for none, so a store may hold ids regardless of case, refusing an addition under an id that differs from one it holds only in case, as the server's own store does.

A registration is kept whole, Trust included: the server decides it once, when the client registers, and answers the trust in the client's redirect URIs from it alone, so a store dropping it serves the client as trusted.

The clients a tenant's definition configures stay in the definition, and the server keeps them apart from what this store holds: a configured client is served over a registration under its id, a registration the server meets under such an id - found, added or changed - is removed and answered as not found or not made, and one no request meets stays in this store until the host deletes it.

An addition takes effect only where no registration is held under the client's id; a change or a removal only while the registration held there carries the token identifier of the one it was decided on. Each answers whether it took effect. Registered as a singleton, as the server's client store that calls it is: that store would hold one registered for a request for every request after the first, and a container validating its scopes refuses it at startup.

The registrations of a creation of a tenant the host removes are the host's to delete: the server only stops asking for them. A host learning of the release from the server registers on Released(TenantDefinition) for each tenant an ITenantOpening of its own readies.

Methods

ITenantClientRegistrationStore.TryAddAsync(TenantDefinition, RegisteredClient) Method

Adds client at tenant, unless a registration is held there under its id.

C#
System.Threading.Tasks.Task<bool> TryAddAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, Abblix.Oidc.Server.Features.ClientInformation.RegisteredClient client);

Parameters

tenant TenantDefinition

The tenant of the request.

client RegisteredClient

The client and the identifier of the registration access token issued for it.

Returns

System.Threading.Tasks.Task<System.Boolean>
Whether the registration was added.

ITenantClientRegistrationStore.TryFindAsync(TenantDefinition, string) Method

Finds the registration held at tenant under clientId.

C#
System.Threading.Tasks.Task<Abblix.Oidc.Server.Features.ClientInformation.RegisteredClient?> TryFindAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, string clientId);

Parameters

tenant TenantDefinition

The tenant of the request.

clientId System.String

The client id to look up.

Returns

System.Threading.Tasks.Task<RegisteredClient>
The registration, or null when none is held there.

ITenantClientRegistrationStore.TryRemoveAsync(TenantDefinition, RegisteredClient) Method

Removes the registration held at tenant under the client's id, while it carries the token identifier of current.

C#
System.Threading.Tasks.Task<bool> TryRemoveAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, Abblix.Oidc.Server.Features.ClientInformation.RegisteredClient current);

Parameters

tenant TenantDefinition

The tenant of the request.

current RegisteredClient

The registration the removal was decided on.

Returns

System.Threading.Tasks.Task<System.Boolean>
Whether the registration was removed.

ITenantClientRegistrationStore.TryReplaceAsync(TenantDefinition, RegisteredClient, RegisteredClient) Method

Replaces the registration held at tenant under the client's id with updated, while it carries the token identifier of current.

C#
System.Threading.Tasks.Task<bool> TryReplaceAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, Abblix.Oidc.Server.Features.ClientInformation.RegisteredClient current, Abblix.Oidc.Server.Features.ClientInformation.RegisteredClient updated);

Parameters

tenant TenantDefinition

The tenant of the request.

current RegisteredClient

The registration the change was decided on.

updated RegisteredClient

The registration replacing it.

Returns

System.Threading.Tasks.Task<System.Boolean>
Whether the registration was replaced.