GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Authen::PluggableCaptcha::Challenge(3) User Contributed Perl Documentation Authen::PluggableCaptcha::Challenge(3)

Authen::PluggableCaptcha::Challenge

This is the base class for generating a captcha challenge

captcha challenges must support the following methods

  ->new( keygenerator_instance=> $keygenerator_instance );
  ->validate( user_response=> $user_response );
     validate must return :
        1 success
        0 failure
        -1 error

there are 3 public methods that must be available to other modules

  'instructions'
        what a user should do
  'user_prompt'
    what to prompt the user with
    this will be rendered by the render engine
    for image/audio this is probably the same as correct_response
  'correct_response'
    the repsonse

Example: Image Authen::PluggableCaptcha: instructions: type in the letters you see user_prompt: abcdef correct_response: abcdef

        Text Logic Authen::PluggableCaptcha:
                instructions: do this math problem
                user_prompt: what is 12 divided by 1 ?
                correct_response: 12

new PARAMS Returns a new Authen::PluggableCaptcha::Challenge object constructed according to PARAMS, where PARAMS are name/value pairs.
PARAMS are required name/value pairs. Required PARAMS are:
"keymanager_instance TYPE"
A reference to an object derived from Authen::PluggableCaptcha::KeyManager

Note that setters and getters are seperate. Setters should only be called from derived classes. Getters can be called anywhere from perl code.
validate TYPE
validate the challege

returns: 1 on success 0 on failure -1 on error

This method MUST be overriden in a subclass

_keymanager TYPE
set the keymanager instance
keymanager TYPE
get the keymanager instance
_instructions TYPE
set the instructions text
instructions TYPE
get the instructions text
_user_prompt TYPE
set the user_prompt text
user_prompt TYPE
get the user_prompt text
_correct_response TYPE
set the correct_response text
correct_response TYPE
get the correct_response text

Hey! The above document had some coding errors, which are explained below:
Around line 72:
=over without closing =back
Around line 118:
=over is the last thing in the document?!
2007-02-16 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.