Table of Contents

Class CaptchaServiceCollectionExtensions

Namespace
NuvTools.Security.AspNetCore.Blazor.Extensions
Assembly
NuvTools.Security.AspNetCore.Blazor.dll

Extension methods for registering the client-side CAPTCHA services.

public static class CaptchaServiceCollectionExtensions
Inheritance
CaptchaServiceCollectionExtensions
Inherited Members

Methods

AddCaptcha(IServiceCollection, IConfiguration)

Binds CaptchaOptions from the SectionName section and adds the ICaptchaService to the service collection as a scoped service.

public static IServiceCollection AddCaptcha(this IServiceCollection services, IConfiguration configuration)

Parameters

services IServiceCollection

The service collection to add the service to.

configuration IConfiguration

Configuration holding the CAPTCHA section.

Returns

IServiceCollection

The service collection for chaining.

Remarks

Only the client-side site keys are read here — the API key stays on the server.