Apache2-AuthCookieDBI

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Apache2::AuthCookieDBI is a module that subclasses Apache2::AuthCookie and is
designed to be directly used for authentication in a mod_perl server.

It is a ticket-issuing system that looks up username/passwords in a DBI
database using generic SQL and issues MD5-checksummed tickets valid for
a configurable time period.  Incoming requests with tickets are
checksummed and expire-time checked.

Version 2.03 and later: mod_perl 1.999_22 and later. Apache::*
replaced by Apache2::

Latest distribution at: https://metacpan.org/pod/Apache2::AuthCookieDBI
Source code at:         https://github.com/matisse/Apache-AuthCookieDBI/
 

lib/Apache2/AuthCookieDBI.pm  view on Meta::CPAN

        = @_;

    if ( $encryptiontype eq 'none' ) {
        return $encrypted_session_key;
    }

    my $auth_name = $r->auth_name;

    my $session_key;

    # Check that this looks like an encrypted hex-encoded string.
    if ( $encrypted_session_key !~ HEX_STRING_REGEX ) {
        my $message
            = "${class}\tencrypted session key '$encrypted_session_key' doesn't look like it's properly hex-encoded for auth realm $auth_name";
        $class->logger( $r, Apache2::Const::LOG_ERR, $message, undef,
            LOG_TYPE_SYSTEM, $r->uri );
        return;
    }

    my $cipher = $class->_get_cipher_for_type( $encryptiontype, $auth_name,
        $secret_key );



( run in 0.554 second using v1.01-cache-2.11-cpan-64827b87656 )