From df6cf207d0afe42f2d3035e7eae470cded087f74 Mon Sep 17 00:00:00 2001
From: Steve BATCHEWOUA <59409490+Blus-source@users.noreply.github.com>
Date: Sun, 5 Jan 2025 19:28:39 +0100
Subject: [PATCH] Migrate to .net9
---
.github/workflows/dotnet-build.yml | 47 +++++------
.github/workflows/publish-http.yml | 36 ++++----
README.md | 8 +-
.../KITT.Web.ReCaptcha.Sample.Shared.csproj | 2 +-
....ReCaptcha.Samples.v2.Blazor.Client.csproj | 6 +-
...ITT.Web.ReCaptcha.Samples.v2.Blazor.csproj | 4 +-
....ReCaptcha.Samples.v3.Blazor.Client.csproj | 6 +-
...ITT.Web.ReCaptcha.Samples.v3.Blazor.csproj | 4 +-
...amples.v3.BlazorServerInteractivity.csproj | 2 +-
.../KITT.Web.ReCaptcha.Blazor.csproj | 6 +-
src/KITT.Web.ReCaptcha.Blazor/README.md | 46 ++++++----
.../KITT.Web.ReCaptcha.Http.csproj | 4 +-
src/KITT.Web.ReCaptcha.Http/README.md | 83 ++++++++++---------
.../KITT.Web.ReCaptcha.Blazor.Test.csproj | 10 +--
.../KITT.Web.ReCaptcha.Http.Test.csproj | 8 +-
15 files changed, 142 insertions(+), 130 deletions(-)
diff --git a/.github/workflows/dotnet-build.yml b/.github/workflows/dotnet-build.yml
index ec47664..408f815 100644
--- a/.github/workflows/dotnet-build.yml
+++ b/.github/workflows/dotnet-build.yml
@@ -2,36 +2,35 @@ name: Build and run Test
on:
pull_request:
- branches: [ "main" ]
- paths:
- - '**.cs'
- - '**.razor'
- - '**.csproj'
+ branches: ["main"]
+ paths:
+ - "**.cs"
+ - "**.razor"
+ - "**.csproj"
workflow_dispatch:
env:
- NET_VERSION: '8.x'
+ NET_VERSION: "9.x"
jobs:
build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Setup .NET Core SDK ${{ env.NET_VERSION }}
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: ${{ env.NET_VERSION }}
-
- - name: Restore dependencies
- run: dotnet restore
-
- - name: Build
- run: dotnet build --configuration Release --no-restore
-
- - name: Test
- run: dotnet test --configuration Release --no-build --verbosity normal
-
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup .NET Core SDK ${{ env.NET_VERSION }}
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: ${{ env.NET_VERSION }}
+
+ - name: Restore dependencies
+ run: dotnet restore
+
+ - name: Build
+ run: dotnet build --configuration Release --no-restore
+
+ - name: Test
+ run: dotnet test --configuration Release --no-build --verbosity normal
diff --git a/.github/workflows/publish-http.yml b/.github/workflows/publish-http.yml
index df4f958..430e3de 100644
--- a/.github/workflows/publish-http.yml
+++ b/.github/workflows/publish-http.yml
@@ -2,15 +2,15 @@ name: Publish Http project to NuGet
on:
push:
- branches: [ 'main' ]
- paths:
- - 'src/KITT.Web.ReCaptcha.Http/**'
+ branches: ["main"]
+ paths:
+ - "src/KITT.Web.ReCaptcha.Http/**"
workflow_dispatch:
env:
- NET_VERSION: '8.x'
- PROJECT_PATH: 'src/KITT.Web.ReCaptcha.Http'
- PROJECT_FILE: 'KITT.Web.ReCaptcha.Http.csproj'
+ NET_VERSION: "9.x"
+ PROJECT_PATH: "src/KITT.Web.ReCaptcha.Http"
+ PROJECT_FILE: "KITT.Web.ReCaptcha.Http.csproj"
jobs:
publish:
@@ -18,17 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Setup .NET Core SDK ${{ env.NET_VERSION }}
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: ${{ env.NET_VERSION }}
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
- - name: Create nupkg file
- run: dotnet pack -c Release -o . '${{ env.PROJECT_PATH }}/${{ env.PROJECT_FILE }}'
+ - name: Setup .NET Core SDK ${{ env.NET_VERSION }}
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: ${{ env.NET_VERSION }}
- - name: Publish on NuGet
- run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json
\ No newline at end of file
+ - name: Create nupkg file
+ run: dotnet pack -c Release -o . '${{ env.PROJECT_PATH }}/${{ env.PROJECT_FILE }}'
+
+ - name: Publish on NuGet
+ run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_APIKEY }} -s https://api.nuget.org/v3/index.json
diff --git a/README.md b/README.md
index f5c0fae..581cb98 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@ This repository contains a set of packages which allows you to add Google reCapt
## KITT.Web.ReCaptcha.Blazor
This project add Google reCaptcha to your Blazor apps.
-This project targets **.NET 8** as supported Framework version.
+This project targets **.NET 9** as supported Framework version.
### Installation
This project is available on NuGet.
-It can be installed using the ```dotnet add package``` command or the NuGet wizard on your favourite IDE.
+It can be installed using the `dotnet add package` command or the NuGet wizard on your favourite IDE.
```bash
dotnet add package KITT.Web.ReCaptcha.Blazor
@@ -22,13 +22,13 @@ More informations are available on the project [README](https://github.com/albx/
## KITT.Web.ReCaptcha.Http
This project add Google reCaptcha to your ASP.NET Core apps giving the service to validate your reCaptcha client response.
-This project targets **.NET 6** and **.NET 8** as supported Framework versions.
+This project targets **.NET 6** and **.NET 9** as supported Framework versions.
### Installation
This project is available on NuGet.
-It can be installed using the ```dotnet add package``` command or the NuGet wizard on your favourite IDE.
+It can be installed using the `dotnet add package` command or the NuGet wizard on your favourite IDE.
```bash
dotnet add package KITT.Web.ReCaptcha.Http
diff --git a/samples/KITT.Web.ReCaptcha.Sample.Shared/KITT.Web.ReCaptcha.Sample.Shared.csproj b/samples/KITT.Web.ReCaptcha.Sample.Shared/KITT.Web.ReCaptcha.Sample.Shared.csproj
index 30402ac..0d2df0d 100644
--- a/samples/KITT.Web.ReCaptcha.Sample.Shared/KITT.Web.ReCaptcha.Sample.Shared.csproj
+++ b/samples/KITT.Web.ReCaptcha.Sample.Shared/KITT.Web.ReCaptcha.Sample.Shared.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
diff --git a/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client.csproj b/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client.csproj
index 162c9d5..0553253 100644
--- a/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client.csproj
+++ b/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client/KITT.Web.ReCaptcha.Samples.v2.Blazor.Client.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
true
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.csproj b/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.csproj
index d3516ea..4a4bb77 100644
--- a/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.csproj
+++ b/samples/v2/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor/KITT.Web.ReCaptcha.Samples.v2.Blazor.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
@@ -9,7 +9,7 @@
-
+
diff --git a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client.csproj b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client.csproj
index 162c9d5..0553253 100644
--- a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client.csproj
+++ b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client/KITT.Web.ReCaptcha.Samples.v3.Blazor.Client.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
true
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.csproj b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.csproj
index f0650ca..cc8c784 100644
--- a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.csproj
+++ b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor/KITT.Web.ReCaptcha.Samples.v3.Blazor.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
35c49c18-040c-4752-b489-40218717aa41
@@ -10,7 +10,7 @@
-
+
diff --git a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity.csproj b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity.csproj
index cbf8393..7aaab89 100644
--- a/samples/v3/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity.csproj
+++ b/samples/v3/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity/KITT.Web.ReCaptcha.Samples.v3.BlazorServerInteractivity.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
diff --git a/src/KITT.Web.ReCaptcha.Blazor/KITT.Web.ReCaptcha.Blazor.csproj b/src/KITT.Web.ReCaptcha.Blazor/KITT.Web.ReCaptcha.Blazor.csproj
index a87b815..5e73355 100644
--- a/src/KITT.Web.ReCaptcha.Blazor/KITT.Web.ReCaptcha.Blazor.csproj
+++ b/src/KITT.Web.ReCaptcha.Blazor/KITT.Web.ReCaptcha.Blazor.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
Alberto Mori
@@ -22,8 +22,8 @@
-
-
+
+
diff --git a/src/KITT.Web.ReCaptcha.Blazor/README.md b/src/KITT.Web.ReCaptcha.Blazor/README.md
index 8e44664..716193c 100644
--- a/src/KITT.Web.ReCaptcha.Blazor/README.md
+++ b/src/KITT.Web.ReCaptcha.Blazor/README.md
@@ -1,26 +1,27 @@
# KITT.Web.ReCaptcha.Blazor
This project add Google reCaptcha to your Blazor apps.
-This project targets **.NET 8** as supported Framework version.
+This project targets **.NET 9** as supported Framework version.
## Installation
This project is available on [NuGet](https://www.nuget.org/packages/KITT.Web.ReCaptcha.Blazor).
-It can be installed using the ```dotnet add package``` command or the NuGet wizard on your favourite IDE.
+It can be installed using the `dotnet add package` command or the NuGet wizard on your favourite IDE.
```bash
dotnet add package KITT.Web.ReCaptcha.Blazor
```
## reCaptcha v2
+
### Usage
The project gives you a Razor component which add the reCaptcha v2 widget.
-Add the namespace ```KITT.Web.ReCaptcha.Blazor.v2``` to your Razor Components or in the ```_Imports.razor``` file.
+Add the namespace `KITT.Web.ReCaptcha.Blazor.v2` to your Razor Components or in the `_Imports.razor` file.
-After that you can use the `````` component in your ```EditForm``` like in this sample:
+After that you can use the `` component in your `EditForm` like in this sample:
```csharp
``` component in your ```EditForm```
### Parameters
-The component needs to be used inside an ```EditForm```. It exposes the following properties:
+The component needs to be used inside an `EditForm`. It exposes the following properties:
-|Property|Description|
-|---|---|
-|**SiteKey** (Required)|*string*: the value of the v2 client site key|
-|**@bind-Value**|*string*: the property to bind|
-|**Theme**|*Theme* enum: the theme to use (default: *Theme.Light*)|
-|**Size**|*Size* enum: the size of the widget (default: *Size.Normal*)|
-|**TabIndex**|*int*: the tabIndex value (default: *0*)|
-|**Id**|*string*: the id of the HTML element used to render the reCaptcha widget (*default*: "recaptcha")|
+| Property | Description |
+| ---------------------- | ------------------------------------------------------------------------------------------------- |
+| **SiteKey** (Required) | _string_: the value of the v2 client site key |
+| **@bind-Value** | _string_: the property to bind |
+| **Theme** | _Theme_ enum: the theme to use (default: _Theme.Light_) |
+| **Size** | _Size_ enum: the size of the widget (default: _Size.Normal_) |
+| **TabIndex** | _int_: the tabIndex value (default: _0_) |
+| **Id** | _string_: the id of the HTML element used to render the reCaptcha widget (_default_: "recaptcha") |
## reCaptcha v3
+
### Usage
-You can register reCaptcha using the ```AddReCaptchaV3``` extension method:
+You can register reCaptcha using the `AddReCaptchaV3` extension method:
+
```csharp
using KITT.Web.ReCaptcha.Blazor.v3;
//...
builder.Services.AddReCaptchaV3(options => options.SiteKey = "");
```
-After that you have to add the *ReCaptchaScript* component.
+
+After that you have to add the _ReCaptchaScript_ component.
#### Blazor Web App
-With the new Blazor Web App you can add the *ReCaptchaScript* component to your App.razor:
+
+With the new Blazor Web App you can add the _ReCaptchaScript_ component to your App.razor:
+
```razor
....
@@ -67,19 +73,25 @@ With the new Blazor Web App you can add the *ReCaptchaScript* component to your
```
#### Blazor WebAssembly
+
If you're using Blazor WebAssembly, simply register it to the RootComponents calling the extension method:
+
```csharp
builder.RootComponents.RegisterReCaptchaScript();
```
#### Blazor Server
-If you're using Blazor Server, edit the *_Host.cshtml* page in this way:
+
+If you're using Blazor Server, edit the _\_Host.cshtml_ page in this way:
+
```razor
....
```
+
After that you can inject the ReCaptchaService to your component and call the VerifyAsync method:
+
```razor
@inject ReCaptchaService ReCaptcha
...
diff --git a/src/KITT.Web.ReCaptcha.Http/KITT.Web.ReCaptcha.Http.csproj b/src/KITT.Web.ReCaptcha.Http/KITT.Web.ReCaptcha.Http.csproj
index 7379d3a..ff5aa31 100644
--- a/src/KITT.Web.ReCaptcha.Http/KITT.Web.ReCaptcha.Http.csproj
+++ b/src/KITT.Web.ReCaptcha.Http/KITT.Web.ReCaptcha.Http.csproj
@@ -1,7 +1,7 @@
- net6.0;net8.0
+ net6.0;net9.0
enable
enable
True
@@ -18,7 +18,7 @@
-
+
diff --git a/src/KITT.Web.ReCaptcha.Http/README.md b/src/KITT.Web.ReCaptcha.Http/README.md
index 0e8ebd0..9dffaba 100644
--- a/src/KITT.Web.ReCaptcha.Http/README.md
+++ b/src/KITT.Web.ReCaptcha.Http/README.md
@@ -1,24 +1,25 @@
# KITT.Web.ReCaptcha.Http
This project add Google reCaptcha to your ASP.NET Core apps giving the service to validate your reCaptcha client response.
-This project targets **.NET 6** and **.NET 8** as supported Framework versions.
+This project targets **.NET 6** and **.NET 9** as supported Framework versions.
## Installation
This project is available on NuGet.
-It can be installed using the ```dotnet add package``` command or the NuGet wizard on your favourite IDE.
+It can be installed using the `dotnet add package` command or the NuGet wizard on your favourite IDE.
```bash
dotnet add package KITT.Web.ReCaptcha.Http
```
## reCaptcha v2
+
### Usage
-The project gives you an HttpClient service which expose a *VerifyAsync* method to verify the reCaptcha response send by the user from the client.
+The project gives you an HttpClient service which expose a _VerifyAsync_ method to verify the reCaptcha response send by the user from the client.
-Add the namespace ```KITT.Web.ReCaptcha.Http.v2``` to your ```Program.cs``` and use the *AddReCaptchaV2HttpClient* extension method to your ```IServiceCollection``` instance:
+Add the namespace `KITT.Web.ReCaptcha.Http.v2` to your `Program.cs` and use the _AddReCaptchaV2HttpClient_ extension method to your `IServiceCollection` instance:
```
builder.Services.AddReCaptchaV2HttpClient(options =>
@@ -27,7 +28,7 @@ builder.Services.AddReCaptchaV2HttpClient(options =>
});
```
-Then you can inject the ```ReCaptchaService``` class whenever you need and call the ```VerifyAsync``` like this:
+Then you can inject the `ReCaptchaService` class whenever you need and call the `VerifyAsync` like this:
```
app.MapPost("/send", async (ReCaptchaService reCaptchaService, [FromBody] SendRequest request) =>
@@ -45,29 +46,30 @@ app.MapPost("/send", async (ReCaptchaService reCaptchaService, [FromBody] SendRe
### Methods
-The ```VerifyAsync``` method has the following input parameters:
+The `VerifyAsync` method has the following input parameters:
-|Property|Description|
-|---|---|
-|**response** (Required)|*string*: The user response token provided by the reCAPTCHA client-side integration on your site.|
-|**remoteIp** (Optional)|*string*: The user's IP address. (Default: *null*)|
-|**cancellationToken** (Optional)|*CancellationToken*: a cancellation token instance (Default: *CancellationToken.None*)|
+| Property | Description |
+| -------------------------------- | ------------------------------------------------------------------------------------------------- |
+| **response** (Required) | _string_: The user response token provided by the reCAPTCHA client-side integration on your site. |
+| **remoteIp** (Optional) | _string_: The user's IP address. (Default: _null_) |
+| **cancellationToken** (Optional) | _CancellationToken_: a cancellation token instance (Default: _CancellationToken.None_) |
-The method returns an instance of the ```ReCaptchaResponse``` class, which have the following properties:
+The method returns an instance of the `ReCaptchaResponse` class, which have the following properties:
-|Property|Description|
-|---|---|
-|**Success**|*bool*: whether the verification ended successfully|
-|**ChallengeTimestamp**|*DateTime*: the timestamp of the challenge load|
-|**Hostname**|*string*: the hostname of the site where the reCAPTCHA was solved|
-|**ErrorCodes**|*IEnumerable<string>*: the optional list of error codes (see [Google's official documentation](https://developers.google.com/recaptcha/docs/verify#error_code_reference))|
+| Property | Description |
+| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Success** | _bool_: whether the verification ended successfully |
+| **ChallengeTimestamp** | _DateTime_: the timestamp of the challenge load |
+| **Hostname** | _string_: the hostname of the site where the reCAPTCHA was solved |
+| **ErrorCodes** | _IEnumerable<string>_: the optional list of error codes (see [Google's official documentation](https://developers.google.com/recaptcha/docs/verify#error_code_reference)) |
## reCaptcha v3
+
### Usage
-The project gives you an HttpClient service which expose a *VerifyAsync* method to verify the reCaptcha response send by the user from the client.
+The project gives you an HttpClient service which expose a _VerifyAsync_ method to verify the reCaptcha response send by the user from the client.
-Add the namespace ```KITT.Web.ReCaptcha.Http.v3``` to your ```Program.cs``` and use the *AddReCaptchaV3HttpClient* extension method to your ```IServiceCollection``` instance:
+Add the namespace `KITT.Web.ReCaptcha.Http.v3` to your `Program.cs` and use the _AddReCaptchaV3HttpClient_ extension method to your `IServiceCollection` instance:
```
builder.Services.AddReCaptchaV3HttpClient(options =>
@@ -76,7 +78,7 @@ builder.Services.AddReCaptchaV3HttpClient(options =>
});
```
-Then you can inject the ```ReCaptchaService``` class whenever you need and call the ```VerifyAsync``` like this:
+Then you can inject the `ReCaptchaService` class whenever you need and call the `VerifyAsync` like this:
```
app.MapPost("/send", async (ReCaptchaService reCaptchaService, [FromBody] SendRequest request) =>
@@ -94,23 +96,22 @@ app.MapPost("/send", async (ReCaptchaService reCaptchaService, [FromBody] SendRe
### Methods
-The ```VerifyAsync``` method has the following input parameters:
-
-|Property|Description|
-|---|---|
-|**response** (Required)|*string*: The user response token provided by the reCAPTCHA client-side integration on your site.|
-|**action** (Required)|*string*: The action value used to configure the reCaptcha|
-|**remoteIp** (Optional)|*string*: The user's IP address. (Default: *null*)|
-|**cancellationToken** (Optional)|*CancellationToken*: a cancellation token instance (Default: *CancellationToken.None*)|
-
-The method returns an instance of the ```ReCaptchaResponse``` class, which have the following properties:
-
-|Property|Description|
-|---|---|
-|**Success**|*bool*: whether the verification ended successfully|
-|**Score**|*double*: the score for the request (from 0.0 to 1.0)|
-|**Action**|*string*: the action name for this request|
-|**ChallengeTimestamp**|*DateTime*: the timestamp of the challenge load|
-|**Hostname**|*string*: the hostname of the site where the reCAPTCHA was solved|
-|**ErrorCodes**|*IEnumerable<string>*: the optional list of error codes (see [Google's official documentation](https://developers.google.com/recaptcha/docs/verify#error_code_reference))|
-
+The `VerifyAsync` method has the following input parameters:
+
+| Property | Description |
+| -------------------------------- | ------------------------------------------------------------------------------------------------- |
+| **response** (Required) | _string_: The user response token provided by the reCAPTCHA client-side integration on your site. |
+| **action** (Required) | _string_: The action value used to configure the reCaptcha |
+| **remoteIp** (Optional) | _string_: The user's IP address. (Default: _null_) |
+| **cancellationToken** (Optional) | _CancellationToken_: a cancellation token instance (Default: _CancellationToken.None_) |
+
+The method returns an instance of the `ReCaptchaResponse` class, which have the following properties:
+
+| Property | Description |
+| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **Success** | _bool_: whether the verification ended successfully |
+| **Score** | _double_: the score for the request (from 0.0 to 1.0) |
+| **Action** | _string_: the action name for this request |
+| **ChallengeTimestamp** | _DateTime_: the timestamp of the challenge load |
+| **Hostname** | _string_: the hostname of the site where the reCAPTCHA was solved |
+| **ErrorCodes** | _IEnumerable<string>_: the optional list of error codes (see [Google's official documentation](https://developers.google.com/recaptcha/docs/verify#error_code_reference)) |
diff --git a/tests/KITT.Web.ReCaptcha.Blazor.Test/KITT.Web.ReCaptcha.Blazor.Test.csproj b/tests/KITT.Web.ReCaptcha.Blazor.Test/KITT.Web.ReCaptcha.Blazor.Test.csproj
index ca29e08..13e59dc 100644
--- a/tests/KITT.Web.ReCaptcha.Blazor.Test/KITT.Web.ReCaptcha.Blazor.Test.csproj
+++ b/tests/KITT.Web.ReCaptcha.Blazor.Test/KITT.Web.ReCaptcha.Blazor.Test.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
@@ -10,15 +10,15 @@
-
-
+
+
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/tests/KITT.Web.ReCaptcha.Http.Test/KITT.Web.ReCaptcha.Http.Test.csproj b/tests/KITT.Web.ReCaptcha.Http.Test/KITT.Web.ReCaptcha.Http.Test.csproj
index 618bab0..31542ac 100644
--- a/tests/KITT.Web.ReCaptcha.Http.Test/KITT.Web.ReCaptcha.Http.Test.csproj
+++ b/tests/KITT.Web.ReCaptcha.Http.Test/KITT.Web.ReCaptcha.Http.Test.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
enable
enable
@@ -10,15 +10,15 @@
-
+
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all