Table of Contents

Class ValidateCaptchaFilter

Namespace
NuvTools.Security.AspNetCore.Captcha
Assembly
NuvTools.Security.AspNetCore.dll

Adaptive CAPTCHA action filter (reCAPTCHA Enterprise).

public sealed class ValidateCaptchaFilter : IAsyncActionFilter, IFilterMetadata
Inheritance
ValidateCaptchaFilter
Implements
Inherited Members

Remarks

Default flow: the client sends a score token (invisible) in TokenHeader with ModeHeader set to ModeScore. If the score falls below MinScore, the filter answers asking for a step-up (StepUpMarker) and the client resubmits with the checkbox token (ModeCheckbox). Verification is skipped when the CAPTCHA is disabled.

Constructors

ValidateCaptchaFilter(ICaptchaVerifier, IOptions<CaptchaOptions>)

Adaptive CAPTCHA action filter (reCAPTCHA Enterprise).

public ValidateCaptchaFilter(ICaptchaVerifier verifier, IOptions<CaptchaOptions> options)

Parameters

verifier ICaptchaVerifier

Verifier that creates the assessment against the provider.

options IOptions<CaptchaOptions>

CAPTCHA configuration.

Remarks

Default flow: the client sends a score token (invisible) in TokenHeader with ModeHeader set to ModeScore. If the score falls below MinScore, the filter answers asking for a step-up (StepUpMarker) and the client resubmits with the checkbox token (ModeCheckbox). Verification is skipped when the CAPTCHA is disabled.

Methods

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

Called asynchronously before the action, after model binding is complete.

public Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)

Parameters

context ActionExecutingContext

The ActionExecutingContext.

next ActionExecutionDelegate

The ActionExecutionDelegate. Invoked to execute the next action filter or the action itself.

Returns

Task

A Task that on completion indicates the filter has executed.