What's Recaptcha? #

Recaptcha is a Google service that generates captchas. It alternatively has sound-based captchas for the hard of sight.

Why recaptcha? #

It tends to be faster (doesn't use your servers to generate the captcha) and has the sound feature that SimpleCaptcha (the default captcha system in Liferay) doesn't have.

Enable Recaptcha in Liferay #

To enable it, add this to your portal-ext.properties (if you're in the tomcat bundle that's tomcat-{version}/webapps/ROOT/WEB-INF/classes/portal-ext.properties). If the file doesn't exist, you should create it (and read about how to configure a real database, because using HSQL for a real site is not a good idea).

Copy and paste the following, but then go to http://www.google.com/recaptcha to get your public and private keys.

##
# Enable or not reCaptcha
##
#recaptcha.enabled=true

captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
#captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaI

captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false

##
# Urls to access reCaptcha services
##
captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify

##
#reCaptcha domain specific keys
##
captcha.engine.recaptcha.key.private=YOUR KEY. FROM google.com/recaptcha.
captcha.engine.recaptcha.key.public=YOUR KEY. FROM google.com/recaptcha.

NOTE: Make sure when you copy these three lines below, that you copy without the brackets:

captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k= captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify }}}

Starting in Liferay 6.1, Recaptcha can be enabled in the control panel under "Server Administration." See Easily Improve your Captcha for more information.


0 Attachments
15356 Views
Average (2 Votes)
The average rating is 4.5 stars out of 5.
Comments
Threaded Replies Author Date
Cool thanks a lot Samuel Corné Aussems July 27, 2010 10:53 PM
If you need to use ReCaptcha on an... James Denmark March 22, 2011 12:05 PM
http://groups.google.com/group/recaptcha/browse... James Denmark March 22, 2011 12:07 PM

Cool thanks a lot Samuel
Posted on 7/27/10 10:53 PM.
If you need to use ReCaptcha on an ssl-encrypted site the links above will throw security violations in the browser. For secure access to recaptcha the properties above can be changed to https://api-secure.recaptcha.net/XXX but they are changing on 11-Apr-2011 from https://api-secure.recaptcha.net/XXX to https://www.google.com/recaptcha/api/XXX.

<a href="http://groups.google.com/group/recaptcha/browse_thread/thread/57baacc2a067­035a">Link to discussion on ReCaptcha Google Group</a>
Posted on 3/22/11 12:05 PM.
http://groups.google.com/group/recaptcha/browse_thread/thread/57baacc2a067035a
Posted on 3/22/11 12:07 PM in reply to James Denmark.