Download the PHP package tvalimaa/mautic-altcha-bundle without Composer

On this page you can find all versions of the php package tvalimaa/mautic-altcha-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mautic-altcha-bundle

Mautic ALTCHA Plugin

Adds a self-hosted, privacy-friendly ALTCHA (proof-of-work) CAPTCHA field to Mautic forms, built the same way as FireMultimedia's Multi-CAPTCHA bundle (hCaptcha / reCAPTCHA / Turnstile) so it slots into Mautic exactly like those providers - but without ever calling a third-party API.

Why ALTCHA is different from hCaptcha/reCAPTCHA/Turnstile

The other CAPTCHA plugins all POST the visitor's token to a third party (https://api.hcaptcha.com/siteverify, Google, Cloudflare) to find out if the submission was human. Plain, self-hosted ALTCHA never does this. Instead:

  1. Mautic generates a small proof-of-work puzzle (a random salt + max number) and signs it with an HMAC secret that only your server knows.
  2. The visitor's browser (the <altcha-widget> JS component) brute-forces the answer - a cheap operation for a real browser, a deliberately wasteful one to run at scale for a spam bot.
  3. On submit, Mautic re-checks the HMAC signature and recomputes the hash locally. No network call, no cookies, no third-party tracking, GDPR friendly by design.

That's also why the ALTCHA field has no "explicit consent" toggle like the other providers: there's no third-party script or cookie to consent to.

This plugin also supports ALTCHA Sentinel as an optional upgrade - see below.

Self-hosted vs. Sentinel, at a glance

Self-hosted (default) ALTCHA Sentinel
Who issues the challenge Mautic, locally A Sentinel instance (self-hosted or ALTCHA Cloud)
Who verifies the submission Mautic, locally Mautic, locally (checks Sentinel's signature)
Outbound requests from Mautic None None (verification is a local signature check, not an API call)
Extra protection Proof-of-work only Proof-of-work + Sentinel's Adaptive Captcha, Threat Intelligence, Classifier, rate limiting, etc.
What you configure One HMAC secret Sentinel domain + API Key + API Key Secret
Cost Free Depends on your Sentinel plan/hosting

If you fill in both, this plugin prefers Sentinel.

Installation

  1. Copy this MauticAltchaBundle folder into plugins/ in your Mautic root (so the path is plugins/MauticAltchaBundle/...), or publish it as a Composer package and run:

  2. Make sure altcha-org/altcha (^2.0) is installed - it's declared as a dependency in composer.json, so a plain composer install inside your Mautic root will pull it in.
  3. Clear the cache:

  4. Go to Settings → Plugins, click Install/Upgrade Plugins. You should see a new "ALTCHA" plugin appear.

Configuration

Go to Settings → Plugins → ALTCHA. You'll see four fields; fill in either the first one, or the last three - not necessarily all four.

Option A: Self-hosted (just an HMAC secret)

Fill in HMAC Secret. This is not an API key - it never leaves your server. Generate a long, random string, for example:

Treat it like any other application secret (don't commit it, don't reuse it across environments). If it ever leaks, anyone who has it could forge valid "human" submissions - though even then they'd only bypass the CAPTCHA, not gain any other access.

Leave the three Sentinel fields blank.

Option B: ALTCHA Sentinel

If you run (or subscribe to) ALTCHA Sentinel, fill in these three fields instead and leave HMAC Secret blank:

  1. Sentinel Domain / Base URL - your Sentinel instance's base URL, e.g. https://sentinel.example.com for a self-hosted install, or your ALTCHA Cloud region's URL. No trailing slash, no path - Mautic appends /v1/challenge itself when it builds the widget URL.
  2. Sentinel API Key - from Sentinel's API Keys admin section (https://<your-sentinel-domain>/admin → Configuration → API Keys). It looks like key_.... Create a Security Group first if you haven't (that's where you configure Sentinel's actual anti-spam rules), then create an API Key bound to it.
  3. Sentinel API Key Secret - shown alongside the API Key when you create it. Unlike the API Key itself, this value never leaves your server.

With Sentinel configured, the widget fetches its challenge directly from your Sentinel instance instead of from Mautic, and gains Sentinel's extra features (Adaptive Captcha, Threat Intelligence, Classifier, rate limiting, etc., depending on how your Security Group is configured). The Complexity and Challenge expiry field settings (see below) are ignored in this mode, since Sentinel controls its own difficulty.

Add the field to a form

Open any Mautic form in the builder and drag in the ALTCHA field. Under its Properties tab you can set:

Setting What it does
Complexity Low / Medium / High - how much proof-of-work the visitor's browser has to compute. Higher = more spam-resistant but slightly slower, especially on old phones.
Challenge expiry How long (seconds) a generated challenge stays valid. If the visitor takes longer than this to submit, they solve a new one automatically.
Start solving On submit (recommended, default) solves only when the visitor clicks Submit, so nothing is wasted on visitors who never submit. On page load solves immediately in the background so submission feels instant. Off requires a manual checkbox click.
Floating widget Show the widget as a small floating badge instead of an inline box.
Hide footer / Hide ALTCHA logo Cosmetic toggles for the widget chrome.

The field will only appear in the builder once step 1 (HMAC secret) is done - this mirrors how the hCaptcha/reCAPTCHA/Turnstile fields hide themselves until their keys are configured.

How it works internally (for developers)

Security notes

Compatibility

Mautic 5, 6, and 7 (same AppVersion-based branch selection as the reference Multi-CAPTCHA bundle). PHP 8.1+.

License

GPL-3.0, consistent with the reference plugin this was modeled on.


All versions of mautic-altcha-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1|^8.2
ext-json Version *
mautic/core-lib Version ^5.0|^6.0|^7.0
altcha-org/altcha Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tvalimaa/mautic-altcha-bundle contains the following files

Loading the files please wait ...