Authen-PluggableCaptcha

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.05
	cleaned some code to support Authen::PluggableCaptcha::KeyManagerDB
	documented debug args
	removed erroneous call to __validate_key_extended , which was deprecated / removed in earlier versions
	added parameter 'do_not_validate_key' to existing.   this will bypass key validation.

0.04
	Bugfix to 0.03 release.  
		consolidated __init_base_captcha into init 
		removed redundant keymanager creations
		renamed __init__errors to _init
		removed keymanger::init_existed, consolidated into validate_publickey


0.03

lib/Authen/PluggableCaptcha.pm  view on Meta::CPAN

Optional PARAMS are:

=over 8

=item C<keymanager_args TYPE>

The value for the keymanager_args key will be sent to the KeyManager on instantiation as 'keymanager_args'

This is useful if you need to specify a DB connection or something similar to the keymanager

=item C<do_not_validate_key INT>

This is valid only for 'existing' type captchas.  

passing this argument as the integer '1'(1) will not validate the publickey in the keymanager.

This is useful if you are externally handling the key management, and just use this package for Render + Challenge


=back

lib/Authen/PluggableCaptcha.pm  view on Meta::CPAN

existing captcha specific inits
=cut
	my 	( $self , $kw_args__ref )= @_;
	DEBUG_FUNCTION_NAME && Authen::PluggableCaptcha::ErrorLoggingObject::log_function_name('__init_existing');
	if ( ! defined $$kw_args__ref{'publickey'} || ! $$kw_args__ref{'publickey'} ) {
		die "'publickey' must be supplied during init";
	}
	$self->publickey( $$kw_args__ref{'publickey'} );

	if 	(
			defined $$kw_args__ref{'do_not_validate_key'} 
			&& 
			( $$kw_args__ref{'do_not_validate_key'} == 1 )
		)
	{
		$self->keymanager->publickey( $$kw_args__ref{'publickey'} );
		return 1;
	}

	my 	$validate_result= $self->keymanager->validate_publickey( publickey=> $$kw_args__ref{'publickey'} );
	DEBUG_VALIDATION && print STDERR "\n validate_result -> $validate_result ";

	if ( $validate_result < 0 ) {



( run in 0.305 second using v1.01-cache-2.11-cpan-0a987023a57 )