Metadata-Version: 2.4
Name: plone.formwidget.hcaptcha
Version: 1.0.4
Summary: Hcaptcha widget for Plone.
Home-page: https://github.com/plone/plone.formwidget.hcaptcha
Author: Timo Stollenwerk - Plone Foundation
Author-email: plone-developers@lists.sourceforge.net
License: GPLv2
Keywords: plone discussion plone.app.discussion spam captcha hcaptcha
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: Addon
Classifier: Framework :: Plone :: 5.2
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: plone.app.registry
Requires-Dist: plone.registry
Requires-Dist: Products.CMFCore
Requires-Dist: setuptools
Requires-Dist: z3c.form
Requires-Dist: zope.annotation
Requires-Dist: zope.component
Requires-Dist: zope.i18nmessageid
Requires-Dist: zope.interface
Requires-Dist: zope.publisher
Requires-Dist: zope.schema
Requires-Dist: Zope2
Provides-Extra: test
Requires-Dist: plone.api; extra == "test"
Requires-Dist: plone.app.testing; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

Introduction
============

plone.formwidget.hcaptcha is a ``z3c.form`` HCaptcha widget for use with Plone.

It is a re-work of the 'plone.formwidget.recaptcha'_ package original written by Timo Stollenwerk.

.. _plone.forwwidget.recaptcha: http://github.com/plone/plone.formwidget.recaptcha


Buildout Installation
---------------------

Add the following code to your buildout.cfg to install plone.formwidget.hcaptcha::

    [buildout]
    ...

    [instance]
    ...
    eggs =
        ...
        plone.formwidget.hcaptcha
        ...


HCaptcha setup
--------------

There is a control panel at ``http://path/to/site/@@hcaptcha-settings`` to configure the Addon.
HCaptcha provides test keys, that can be used to try out the hcaptcha form and
documentation at https://docs.hcaptcha.com/.

``Site key: 10000000-ffff-ffff-ffff-000000000001``

``Secret key: 0x0000000000000000000000000000000000000000``

To actually use the service, you must obtain a site key and secret key from
`https://www.hcaptcha.com/signup-interstitial <https://www.hcaptcha.com/signup-interstitial/>`_

Verification endpoint
---------------------
According to the official hCaptcha documentation (https://docs.hcaptcha.com/#server),
the token verification endpoint is:

``https://api.hcaptcha.com/siteverify``

This package now uses ``api.hcaptcha.com`` by default instead of ``hcaptcha.com``.
If you need to change the host (e.g. staging or internal testing), set the environment
variable before starting your Plone instance:

``HCAPTCHA_VERIFY_SERVER=api.hcaptcha.com``

If the variable is not defined, the safe default (``api.hcaptcha.com``) will be used.

Usage
-----
See the `demo <https://github.com/plone/plone.formwidget.hcaptcha/tree/master/src/plone/formwidget/hcaptcha/demo>`_ folder inside the distribution for an example usage.

Supermodel
^^^^^^^^^^
You can add a captcha field in an XML model by adding something like this::

    <field name="captcha" type="plone.formwidget.hcaptcha.HCaptchaWidget">
      <title>Solve Captcha</title>
      <description></description>
    </field>



Source Code
-----------

Contributors please read the document `Process for Plone core's development <http://docs.plone.org/develop/plone-coredev/index.html>`_

Sources are at the `Plone code repository hosted at Github <https://github.com/plone/plone.formwidget.hcaptcha>`_.

Changelog
=========

.. You should *NOT* be adding new change log entries to this file, this
   file is managed by towncrier. You *may* edit previous change logs to
   fix problems like typo corrections or such.

.. towncrier release notes start

1.0.4 (2025-11-14)
------------------

Bug fixes:


- Fix hCaptcha verification to use the documented endpoint (api.hcaptcha.com/siteverify) and allow overriding the host via the HCAPTCHA_VERIFY_SERVER environment variable. @alexandreIFB (#13)
- Fix CI. @wesleybl (#15)


1.0.3 (2024-03-28)
------------------

Bug fixes:


- German translation for public validator error message.
  [ksuess]  (#12)


1.0.2 (2022-06-23)
------------------

New features:


- Add an adapter to show the controlpanel in Volto
  [erral] (#8)
- Dutch translation for public validator error message.
  [fredvd] (#10)


Bug fixes:


- Create translation files
  [erral] (#9)


1.0.1 (2022-02-20)
------------------

New features:


- Move CI from TravisCI to Github Actions [jensens] (#29)


Bug fixes:


- Verify against hcaptcha API with correct URL and api path, code was still checking against recaptcha siteverify api. [fredvd]

  Remove IP from sent api call as it can be considered GDPR violation. [fredvd] (#2)


1.0.0 (2021-06-10)
------------------

- Initial release. [andreasma]
