Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:self-service-password:1.4:config_recaptcha [2018/05/17 10:02] (current)
Line 1: Line 1:
 +====== reCAPTCHA ======
  
 +<​note>​Configuration file: ''​self-service-password/​conf/​config.inc.local.php''</​note>​
 +
 +===== Presentation =====
 +
 +reCAPTCHA is a [[http://​en.wikipedia.org/​wiki/​CAPTCHA|CAPTCHA]] service provided by [[http://​www.google.com|Google]].
 +
 +<note warning>​reCAPTCHA require an internet connection bewteen the server hosting Self Service Password and Google.</​note>​
 +
 +Google provide a PHP library and an API that will validate the CAPTCHA, see [[http://​www.google.com/​recaptcha|reCAPTCHA website]] to know more.
 +
 +<note tip>The reCAPTCHA is used on every form in Self Service Password (password change, token, questions, etc.)</​note>​
 +
 +===== Configuration =====
 +
 +==== Activation ====
 +
 +Set this to activate reCAPTCHA feature:
 +
 +<file php>
 +$use_recaptcha = true;
 +</​file>​
 +
 +
 +==== API keys ====
 +
 +You need to get your own API keys from [[http://​www.google.com/​recaptcha|reCAPTCHA website]]. Then configure them in SSP:
 +
 +<file php>
 +$recaptcha_publickey = "​xxxx";​
 +$recaptcha_privatekey = "​xxxx";​
 +</​file>​
 +
 +==== Display ====
 +
 +You can customize the widget (see https://​developers.google.com/​recaptcha/​docs/​display):​
 +<file php>
 +$recaptcha_theme = "​light";​ # dark / light
 +$recaptcha_type = "​image";​ # audio / image
 +$recaptcha_size = "​normal";​ # compact / normal
 +</​file>​
 +
 +==== Request method ====
 +
 +When ''​allow_url_fopen''​ is disallowed for security reason, you can force the request method:
 +<file php>
 +$recaptcha_request_method = '​\ReCaptcha\RequestMethod\CurlPost';​
 +</​file>​