CGI-Session-Auth

 view release on metacpan or  search on metacpan

Auth.pm  view on Meta::CPAN

###
### backend specific methods
###
###########################################################

###########################################################

sub _login {
    
    ##
    ## check login credentials and load user profile
    ##
    
    my $self = shift;
    my ($username, $password) = @_;
    
    # allow only the guest user, for real applications use a subclass
    if ( ($username eq 'guest') && ( $password eq 'guest' ) ) {
        $self->_info("User '$username' logged in");
        $self->{userid} = "guest";
        $self->_loadProfile($self->{userid});

Auth/File.pm  view on Meta::CPAN

	my $self = shift;
	my ($username, $password) = @_;

	$self->_debug("username: $username, password: $password");

	my $result = 0;

	# Get the user data
	my %user_data = $self->_getUserData($username);

	# See if the credentials are valid
	if (%user_data) {
		if (defined $user_data{password}) {
			# check against plaintext password
			$result = ($user_data{password} eq $password);
		} elsif (defined $user_data{crypt_password}) {
			# check against crypted password
			$result = (crypt($password, $user_data{crypt_password}) eq $user_data{crypt_password});
		}
	}
	if ($result) {

README  view on Meta::CPAN

CGI::Session::Auth
==================
$Id: README 26 2006-02-21 12:26:19Z geewiz $

CGI::Session::Auth is a Perl class that provides the necessary
functions for authentication in CGI scripts. It uses CGI::Session for
session management and supports several backends for credentials
storage, such as flat file and DBI.

CGI::Session::Auth offers an alternative approach to HTTP 
authentication. Its goal is to integrate the authentication
process into the web application as seamless as possible while keeping
the programming interface simple.

Users can authenticate themselves by entering their user
name and password into a login form. This is the most common way 
of authenticating a web site visitor.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.566 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )