diff --git a/BitArmory.Turnstile/TurnstileResponse.cs b/BitArmory.Turnstile/TurnstileResponse.cs index 417e612..af975bc 100644 --- a/BitArmory.Turnstile/TurnstileResponse.cs +++ b/BitArmory.Turnstile/TurnstileResponse.cs @@ -42,10 +42,16 @@ public class TurnstileResponse : JsonResponse /// The hostname of the site where the Turnstile was solved /// public string HostName { get; set; } + + /// + /// 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. + /// + public string Action { get; set; } /// /// 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. /// public string CData { get; set; } } diff --git a/BitArmory.Turnstile/TurnstileService.cs b/BitArmory.Turnstile/TurnstileService.cs index b1fd639..0f4bc06 100644 --- a/BitArmory.Turnstile/TurnstileService.cs +++ b/BitArmory.Turnstile/TurnstileService.cs @@ -97,6 +97,9 @@ public virtual async Task 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 diff --git a/HISTORY.md b/HISTORY.md index f6845b8..1d7dd4c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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`.