ReCaptchaClient

Client which handles all ReCaptcha verifications.

Type: Class
Namespace: ReCaptcha.Desktop.UWP.Client
Assembly: ReCaptcha.Desktop.UWP
Inherits from: IReCaptchaClient

public class ReCaptchaBase : IReCaptchaBase

Constructors

Creates a new ReCaptchaClient.

public ReCaptchaClient(
    ReCaptchaConfig configuration,
    PopupConfig popupConfiguration)
ParameterDescription
ReCaptchaConfig configurationThe configuration the ReCaptchaClient should be created with.
PopupConfig popupConfigurationThe configuration the reCAPTCHA popup will be created with.

Creates a new ReCaptchaClient with extendended logging functions

public ReCaptchaClient(
    ReCaptchaConfig configuration,
    PopupConfig popupConfiguration,
    ILogger<IReCaptchaClient> logger)
ParameterDescription
ReCaptchaConfig configurationThe configuration the ReCaptchaClient should be created with.
PopupConfig popupConfigurationThe configuration the reCAPTCHA popup will be created with.
ILogger<IReCaptchaClient> loggerA logger from Dependency Injection with MVVM.

Properties

Configuration

The configuration used for this client.

Type: ReCaptchaConfig
Modifier: none
Default Value: none

PopupConfiguration

The popup configuration used for this client.

Type: PopupConfig
Modifier: none
Default Value: none

VerificationRecieved

Fires when verifcation was recieved.

Type: EventHandler<VerificationRecievedEventArgs>?
Modifier: event

VerificationCancelled

Fires when verifcation was cancelled.

Type: EventHandler<VerificationCancelledEventArgs>?
Modifier: event

ReCaptchaResized

Fires when verifcation was cancelled.

Type: EventHandler<ReCaptchaResizedEventArgs>?
Modifier: event

Methods

VerifyAsync

Sets up the reCAPTCHA site and opens a new window for the user to verify.

Returns: A Google reCAPTCHA token.

Task<string> VerifyAsync(
    CancellationToken cancellationToken = default!)
ParameterDescription
CancellationToken cancellationTokenThe token to cancel this action.