Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion BitArmory.Turnstile/TurnstileResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ public class TurnstileResponse : JsonResponse
/// The hostname of the site where the Turnstile was solved
/// </summary>
public string HostName { get; set; }

/// <summary>
/// The customer widget identifier passed to the widget on the client side. This is used to differentiate
/// widgets using the same sitekey in analytics. Its integrity is protected from modifications by an attacker.
/// </summary>
public string Action { get; set; }

/// <summary>
/// The customer data passed to the widget on the client side. This can be used by the customer
/// to convey state. It is integrity protected by modifications from an attacker.
/// to convey state. Its integrity is protected from modifications by an attacker.
/// </summary>
public string CData { get; set; }
}
Expand Down
3 changes: 3 additions & 0 deletions BitArmory.Turnstile/TurnstileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public virtual async Task<TurnstileResponse> VerifyAsync(string clientToken, str
case "cdata":
result.CData = kv.Value;
break;
case "action":
result.Action = kv.Value;
break;
case "error-codes" when kv.Value is JsonArray errors:
{
result.ErrorCodes = errors.Children
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v1.0.2
* Added support for `action` response value.

## v1.0.1
* Added Cloudflare Turnstile `TestingSiteKeys` and `TestingSecretKeys`.
* Changed `ClientResponseKey` -> `ClientResponseFormKey`.
Expand Down