ReCaptchaClient
Client which handles all ReCaptcha verifications.
Type: Class
Namespace: ReCaptcha.Desktop.WPF.Client
Assembly: ReCaptcha.Desktop.WPF
Inherits from: IReCaptchaClient
public class ReCaptchaBase : IReCaptchaBase
Constructors
Creates a new ReCaptchaClient.
public ReCaptchaClient(
ReCaptchaConfig configuration,
WindowConfig windowConfiguration)
Parameter | Description |
---|---|
ReCaptchaConfig configuration | The configuration the ReCaptchaClient should be created with. |
WindowConfig windowConfiguration | The configuration the reCAPTCHA window will be created with. |
Creates a new ReCaptchaClient with extendended logging functions
public ReCaptchaClient(
ReCaptchaConfig configuration,
WindowConfig windowConfiguration,
ILogger<IReCaptchaClient> logger)
Parameter | Description |
---|---|
ReCaptchaConfig configuration | The configuration the ReCaptchaClient should be created with. |
WindowConfig windowConfiguration | The configuration the reCAPTCHA window 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
WindowConfiguration
The window configuration used for this client.
Type: WindowConfig
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. |