Skip to content

Commit

Permalink
add documentation for FriendlyCaptcha (#895)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur committed Jul 2, 2024
1 parent 2811ab4 commit 9ef5535
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
14 changes: 13 additions & 1 deletion docs/config_general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,19 @@ You should also define the captcha module to use.

For ``$captcha_class``, you can select another captcha module. For now, only ``InternalCaptcha`` and ``FriendlyCaptcha`` are supported.

You can also add your own Captcha module. (see :doc:`developpers` )
If you want to set up ``FriendlyCaptcha``, you must also configure additional parameters:

.. code-block:: php
$use_captcha = true;
$captcha_class = "FriendlyCaptcha";
$friendlycaptcha_apiurl = "https://api.friendlycaptcha.com/api/v1/siteverify";
$friendlycaptcha_sitekey = "FC123456789";
$friendlycaptcha_secret = "secret";
See `FriendlyCaptcha documentation <https://docs.friendlycaptcha.com/>`_ for more information:

You can also integrate any other Captcha module by developping the corresponding plugin. (see :doc:`developpers` )


.. |image0| image:: images/br.png
Expand Down
7 changes: 0 additions & 7 deletions lib/captcha/FriendlyCaptcha.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
<?php namespace captcha;

# load the sms module
include_once( __DIR__ . "/Captcha.php");
require_once(__DIR__."/../../vendor/autoload.php");

/*
TODO:
- add audit logs for failed captcha actions
- write configuration doc for FriendlyCaptcha
- write doc about "how to write your custom captcha"
*/

class FriendlyCaptcha extends Captcha
{
Expand Down

0 comments on commit 9ef5535

Please sign in to comment.