Table of Contents
API reference

Method AddDiscordIngressSignatureValidator

Namespace
DisCatSharp.Hosting.AspNetCore
Assembly
DisCatSharp.Hosting.AspNetCore.dll

AddDiscordIngressSignatureValidator<TValidator>(IServiceCollection)

Registers a transport-agnostic ingress signature validator.

public static IServiceCollection AddDiscordIngressSignatureValidator<TValidator>(this IServiceCollection services) where TValidator : class, IDiscordIngressSignatureValidator

Parameters

services IServiceCollection

The service collection to update.

Returns

IServiceCollection

The service collection for chaining purposes.

Type Parameters

TValidator

The validator implementation to add.

Remarks

Validators are aggregated by IDiscordIngressSignatureValidationService in registration order. Return NotValidated(string?) when a validator does not apply to the current request so later validators can still participate.

Exceptions

ArgumentNullException

services is null.