ServiceCollectionExtensions Class
Wires the package into a host's service collection, one call per role. Both build on the Security Events core the host has already wired - key trust and signing are deployment knowledge that belongs to that call - and every registration here lets a host pre-registration win: the extensions supply defaults, never overrides.
public static class ServiceCollectionExtensionsInheritance System.Object → ServiceCollectionExtensions
Methods
ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(this IServiceCollection, IReadOnlyList<ConfiguredStream>) Method
Declares the transmitter's stream set as configuration: the store of a closed deployment whose receivers are the operator's own products - nothing to back up, lifecycle in the operator's file, API mutations ephemeral until restart.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsConfiguredStreams(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
streams System.Collections.Generic.IReadOnlyList<ConfiguredStream>
The declared streams.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
Replace rather than TryAdd, deliberately: this call IS the host's explicit choice of store, so it wins whether it runs before or after AddSharedSignalsTransmitter(this IServiceCollection, SharedSignalsTransmitterOptions)'s in-memory default.
The declarations are reconciled into a backing store, and this overload's is in memory -
right for one instance, and the reason a receiver's pause reaches no further than the
instance that took the request. A transmitter running several passes a shared one, which
AddSharedSignalsRedisConfiguredStreams does.
ServiceCollectionExtensions.AddSharedSignalsConfiguredStreams(this IServiceCollection, IReadOnlyList<ConfiguredStream>, Func<IServiceProvider,IStreamStore>) Method
Declares the transmitter's stream set as configuration, reconciled into a backing store the caller chooses - the form a deployment running more than one instance takes, so that the half of a stream its receiver owns is shared rather than per-instance.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsConfiguredStreams(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Collections.Generic.IReadOnlyList<Abblix.SharedSignals.Transmitter.ConfiguredStream> streams, System.Func<System.IServiceProvider,Abblix.SharedSignals.Transmitter.IStreamStore> backingStore);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
streams System.Collections.Generic.IReadOnlyList<ConfiguredStream>
The declared streams.
backingStore System.Func<System.IServiceProvider,IStreamStore>
Builds the store the declarations are reconciled into.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
The backing store is built by a factory rather than resolved from the container, because the container's IStreamStore is what this call registers: resolving it would hand the store itself.
ServiceCollectionExtensions.AddSharedSignalsDistributedOutbox(this IServiceCollection) Method
Puts the transmitter's outbox on the host's IDistributedCache, so pending events
survive a process restart when the store behind the cache does. Replace rather than
TryAdd for the same reason as
AddSharedSignalsConfiguredStreams(this IServiceCollection, IReadOnlyList<ConfiguredStream>):
an explicit choice wins in any order.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsDistributedOutbox(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
Surviving a restart and surviving a second instance are different properties, and this call
buys the first only. IDistributedCache writes whole values with no compare-and-set,
so two instances editing one stream's queue overwrite each other; a transmitter running
more than one instance takes AddSharedSignalsRedisOutbox instead.
ServiceCollectionExtensions.AddSharedSignalsReceiver(this IServiceCollection, SharedSignalsValidationOptions) Method
Registers the receiver role: the push intake handler over the receiver's OWN validation profile, with the three SSF steps joined in their required positions - the cheap "sub" rejection among the unverified checks, the stream-issuer binding among the trusted ones, the critical-members check last.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsReceiver(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Abblix.SharedSignals.Receiver.SecurityEvent.SharedSignalsValidationOptions options);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
options SharedSignalsValidationOptions
What this receiver expects of every token; registered as the shared instance, so a host pre-registering its own SharedSignalsValidationOptions wins.
Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection
Remarks
The receiver validates under its own named profile
(Abblix.SecurityEvents.Infrastructure.ValidationProfileKeys.SecurityEvent) rather than by editing the host's plain
family. The plain family is shared, and another consumer of security event tokens in the
same host - Back-Channel Logout is the live example - shapes it to demands a SET
contradicts outright: its typ replacement refuses everything that is not a logout
token, its exp replacement requires the claim a SET must not carry. Editing the
shared family therefore either breaks that consumer or is broken by it, depending on
registration order, and the loser sees every one of its tokens refused. A named profile
removes the ordering from the outcome: each consumer owns its copy, and this package's
steps and critical declarations bind to this profile alone.
The host still owes two registrations of its own: an
Abblix.SecurityEvents.Delivery.ISecurityEventSink, because where events
land is the application, and key resolution (for example
AddJwksKeyResolution), because key trust is deployment knowledge. A replay cache
(AddDistributedReplayCache) is optional and picked up when present.
ServiceCollectionExtensions.AddSharedSignalsTransmitter(this IServiceCollection, SharedSignalsTransmitterOptions) Method
Registers the transmitter role: the in-memory stream store and outbox as replaceable defaults, the dispatcher, the management service, the poll endpoint handler, and the push sender as a typed HTTP client.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSharedSignalsTransmitter(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Abblix.SharedSignals.Transmitter.SharedSignalsTransmitterOptions options);Parameters
services Microsoft.Extensions.DependencyInjection.IServiceCollection
The service collection.
options SharedSignalsTransmitterOptions
The deployment's one-time decisions; registered as the shared instance, so a host pre-registering its own SharedSignalsTransmitterOptions wins.