OpenPlugin::Authenticate::Template - Sample template for creating a OpenThought


OpenPlugin documentation Contained in the OpenPlugin distribution.

Index


Code Index:

NAME

Top

OpenPlugin::Authenticate::Template - Sample template for creating a OpenThought Authentication driver.

PARAMETERS

Top

No parameters can be passed in to OpenPlugin's new() method for this driver. The following parameters are accepted via the authenticate() method:

* username

The username to authenticate.

* password

The password to verify.

* <others>

List additional parameters your driver offers here.

TO DO

Top

Nothing known.

BUGS

Top

None known.

COPYRIGHT

Top

AUTHORS

Top

Eric Andreychek <eric@openthought.net>


OpenPlugin documentation Contained in the OpenPlugin distribution.

package OpenPlugin::Authenticate::Template;

# $Id: Template.pm,v 1.11 2003/04/03 01:51:24 andreychek Exp $

# This is a template for an authentication driver.  You can use this as a base
# for creating new drivers that authenticate your users against a particular
# text file, database, or whatever else you can think up.  The only sub you
# have to create is 'authenticate'.

use strict;
use OpenPlugin::Authenticate();
use base          qw( OpenPlugin::Authenticate );

$OpenPlugin::Authenticate::Template::VERSION = sprintf("%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/);

sub authenticate {
    my ($self, $args) = @_;

    $self->OP->log->info( "Authenticating $args->{username}");

    # Use the arguments sent in via the hashref $args to authenticate a user
    # via some means.  Return true if they succesfully authenticated, false
    # otherwise.

}


1;

__END__