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


Manual Reference Pages  -  CATALYST::PLUGIN::CAPTCHA (3)

.ds Aq ’

NAME

Catalyst::Plugin::Captcha - create and validate Captcha for Catalyst

CONTENTS

SYNOPSIS



  use Catalyst qw/Captcha/;

  MyApp->config->{ Plugin::Captcha } = {
    session_name => captcha_string,
    new => {
      width => 80,
      height => 30,
      lines => 7,
      gd_font => giant,
    },
    create => [qw/normal rect/],
    particle => [100],
    out => {force => jpeg}
  };

  sub captcha : Local {
    my ($self, $c) = @_;
    $c->create_captcha();
  }

  sub do_post : Local {
    my ($self, $c) = @_;
    if ($c->validate_captcha($c->req->param(validate)){
      ..
    } else {
      ..
    }
  }

  #validate with CP::FormValidator::Simple
  sub do_post : Local {
    my ($self, $c) = @_;
    $c->form(
      validate => [[EQUAL_TO,$c->captcha_string]]
    )
  }



DESCRIPTION

This plugin create, validate Captcha.

Note: This plugin uses GD::SecurityImage and requires a session plugins like Catalyst::Plugin::Session

METHODS

    create_captcha

Create Captcha image and output it.

    validate_captcha



  $c->validate_captcha($key);



validate key

    captcha_string

Return a string for validation which is stroed in session.

    clear_captcha_string

Clear a string which is stroed in session.

CONFIGURATION

session_name The keyword for storing captcha string
new
create
particle
out These parameters are passed to each GD::Security’s method. Please see GD::SecurityImage for details.

SEE ALSO

GD::SecurityImage, Catalyst

AUTHOR

Masahiro Nagano <kazeburo@nomadscafe.jp>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Masahiro Nagano

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.

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


perl v5.20.3 CATALYST::PLUGIN::CAPTCHA (3) 2010-04-03

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