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)
Parameter | Description |
---|---|
ReCaptchaConfig configuration | The configuration the ReCaptchaClient should be created with. |
PopupConfig popupConfiguration | The 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)
Parameter | Description |
---|---|
ReCaptchaConfig configuration | The configuration the ReCaptchaClient should be created with. |
PopupConfig popupConfiguration | The configuration the reCAPTCHA popup will be created with. |
ILogger<IReCaptchaClient> logger | A 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!)
Parameter | Description |
---|---|
CancellationToken cancellationToken | The token to cancel this action. |