Authen-PluggableCaptcha
view release on metacpan or search on metacpan
lib/Authen/PluggableCaptcha/Tutorial.pm view on Meta::CPAN
The default KeyManager class uses a site_secret to create the key.
=head3 Also, from the example in the Tutorial, it isn't quite clear if you first have to generate a new CAPTCHA, just to get its key, and then use that key to construct an existing CAPTCHA to create the JPEG. This isn't the case, is it? I could call ...
Yes. it renders directly on this example 'Generate a Captcha' above.
I think there is some confusion in this tutorial because i do 2 things that are a little odd:
a- i run through the captcha generator to pull a new valid key, this way i can use a new example and have a key validate
b- i run through the captcha validator while i can 'guess' an obviously wrong answer. The way the system is structured, a solution is only provided when you try to validate the captcha. That is because you might want to 'Render' an existing sound/...
To display a CAPTCHA, you just create a new object and call the render method , passing in a challenge class and render class. You can call the render method as often as you'd like. Currently, the module will transparently validate the key in order...
=head3 You actually need to validate the key before check for a correct answer. But couldn't that data be stored on the backend?
Yes, You could store the data on the backend. The 'new' constructor will automatically call a key validator so it behaves more like this:
my $captcha= new()
if ( !$captcha->EXPIRED && !captcha->INVALID )
{
( run in 0.723 second using v1.01-cache-2.11-cpan-702932259ff )