Skip to content

SharedSignalsMultiTenancyExtensions Class

Makes a Shared Signals transmitter per tenant.

C#
public static class SharedSignalsMultiTenancyExtensions

Inheritance System.Object → SharedSignalsMultiTenancyExtensions

Methods

SharedSignalsMultiTenancyExtensions.AddConfiguredStreams(this IOidcServerBuilder, string, IReadOnlyList<ConfiguredStream>) Method

Declares the streams of the tenant tenantId as configuration: they are that tenant's stream set, reconciled into its own part of the stream store the first time it is asked for its streams, so its receivers find them and no other tenant's does.

C#
public static Abblix.Oidc.Server.IOidcServerBuilder AddConfiguredStreams(this Abblix.Oidc.Server.IOidcServerBuilder builder, string tenantId, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams);

Parameters

builder IOidcServerBuilder

What registering the server returned, after AddSharedSignals(this IOidcServerBuilder).

tenantId System.String

The id of the tenant whose streams these are.

streams System.Collections.Generic.IReadOnlyList<ConfiguredStream>

The declared streams.

Returns

IOidcServerBuilder
The same builder.

Remarks

The declared streams are kept as a store of declared streams keeps them: the configuration owns what each stream is, the receiver what it has done through the management API since, and a stream of the tenant the configuration no longer declares is deleted. A tenant declares its streams in one call.

The server does not start when a tenant it serves at that moment declares a stream no request could be served from, or when its tenants are only those of its settings and none of them has the id.

SharedSignalsMultiTenancyExtensions.AddSharedSignals(this IOidcServerBuilder) Method

Builds a transmitter for each tenant, bound to that tenant's issuer, part of the stores and signing keys, answers each request with the transmitter of the tenant serving it, runs push delivery for each tenant served, and deletes a released tenant's streams.

C#
public static Abblix.Oidc.Server.IOidcServerBuilder AddSharedSignals(this Abblix.Oidc.Server.IOidcServerBuilder builder);

Parameters

builder IOidcServerBuilder

What registering the server returned.

Returns

IOidcServerBuilder
The same builder.

Remarks

Wraps what the transmitter registration and the choice of stores registered, so those come before this call; startup refuses a server in which a later registration replaced a part this kept apart. Call it once.

The stores, the outbox and the delivery lease the host chose hold every tenant's data, and each tenant's transmitter keeps its part of them apart by the tenant's space: a stream identifier alone does not, since a stream a tenant declares carries the identifier its operator chose, and two tenants may choose the same one.