Sitepoint.AltchaCaptcha
1.0.0
dotnet add package Sitepoint.AltchaCaptcha --version 1.0.0
NuGet\Install-Package Sitepoint.AltchaCaptcha -Version 1.0.0
<PackageReference Include="Sitepoint.AltchaCaptcha" Version="1.0.0" />
<PackageVersion Include="Sitepoint.AltchaCaptcha" Version="1.0.0" />
<PackageReference Include="Sitepoint.AltchaCaptcha" />
paket add Sitepoint.AltchaCaptcha --version 1.0.0
#r "nuget: Sitepoint.AltchaCaptcha, 1.0.0"
#:package Sitepoint.AltchaCaptcha@1.0.0
#addin nuget:?package=Sitepoint.AltchaCaptcha&version=1.0.0
#tool nuget:?package=Sitepoint.AltchaCaptcha&version=1.0.0
Sitepoint.AltchaCaptcha
Sitepoint.AltchaCaptcha is a lightweight community C# integration package for the ALTCHA proof-of-work CAPTCHA system.
It provides:
- A self-contained client widget (static assets)
- A typed service layer for communicating with a self-hosted ALTCHA backend
- Simple dependency injection registration for .NET / Umbraco 13 applications
Features
- Works with Umbraco 13 and any .NET 8 web app
- Built-in options pattern (
IOptions<T>) - Optional HTTP client for server-side verification
- Ships with the ALTCHA widget JS + CSS
- Minimal dependencies (only standard .NET abstractions)
Installation
Add the NuGet package:
dotnet add package Sitepoint.AltchaCaptcha
Configuration
In your Program.cs:
builder.Services.AddAltchaCaptcha(options =>
{
options.ApiKey = builder.Configuration["SitepointCaptcha:ApiKey"]!;
options.SiteKey = builder.Configuration["SitepointCaptcha:SiteKey"]!;
options.VerifyChallengeUrl = builder.Configuration["SitepointCaptcha:VerifyUrl"]!;
});
Usage
In a Razor view or partial:
<script src="/altcha-widget.js" type="module"></script>
<form method="post" asp-action="Submit">
<altcha-widget challengeurl="https://localhost:5000//captcha/generate/<siteKey>"></
<altcha-widget>
<button type="submit">Submit</button>
</form>
Verification Example
In your controller:
public class ContactController : Controller
{
private readonly ICaptchaValidationService _captchaValidationService;
public ContactController(ICaptchaValidationService captchaValidationService) => _captchaValidationService = captchaValidationService;
[HttpPost]
public async Task<IActionResult> Submit(ContactFormModel model)
{
if (!ModelState.IsValid)
{
return CurrentUmbracoPage();
}
var validationResult = await _captchaValidationService.ValidateAsync(HttpContext.Request.Form["altcha"]);
if (!validationResult.IsValid)
{
TempData["CaptchaNotValid"] = true;
return CurrentUmbracoPage();
}
TempData["FormSubmitted"] = true;
return RedirectToCurrentUmbracoPage();
}
}
License
This package is licensed under the MIT License (see LICENSE file).
Portions of this software are derived from the ALTCHA project and the Ixnas.AltchaNet C# library, both licensed under MIT.
About
This package is developed and maintained by Site Point as a community C# integration layer for self-hosted ALTCHA deployments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Ixnas.AltchaNet (>= 1.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Http (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 272 | 10/20/2025 |