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
servicesIServiceCollectionThe service collection to update.
Returns
- IServiceCollection
The service collection for chaining purposes.
Type Parameters
TValidatorThe 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
servicesis null.