The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CatalystX::Controller::reCAPTCHA - authenticate people and read books!

SUMMARY

Catalyst::Controller wrapper around Capatcha::reCAPTCHA. Provides a number of Private methods that deal with the recaptcha.

CONFIGURATION

In MyApp.pm (or equivalent in config file):

 __PACKAGE__->config->{recaptcha}->{pub_key} = '6LcsbAAAAAAAAPDSlBaVGXjMo1kJHwUiHzO2TDze';
 __PACKAGE__->config->{recaptcha}->{priv_key} = '6LcsbAAAAAAAANQQGqwsnkrTd7QTGRBKQQZwBH-L';

(the two keys above work for http://localhost).

METHOD

captcha_get : Private

Sets $c->stash->{recaptcha} to be the html form for the http://recaptcha.net/ reCAPTCHA service which can be included in your HTML form.

METHOD

captcha_check : Private

Validates the reCaptcha using Captcha::reCAPTCHA. sets $c->stash->{recaptcha_ok} which will be 1 on success or an error string provided by Captcha::reCAPTCHA on failure.

EXAMPLES

See the t/lib/TestApp example in the CatalystX::Controller::reCAPTCHA distribution.

SEE ALSO

Captcha::reCAPTCHA, Catalyst::Controller, Catalyst.

AUTHOR and Copyright

Kieren Diment zarquon@cpan.org.

LICENCE

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.