# -*- perl -*-
-# This is part of CGI::Auth::Hybrid, a perl CGI authentication module.
+# This is part of CGI::Auth::Flexible, a perl CGI authentication module.
# Copyright (C) 2012 Ian Jackson.
# Copyright (C) 2012 Citrix.
#
use strict;
use warnings;
-package CGI::Auth::Hybrid;
+package CGI::Auth::Flexible;
require Exporter;
BEGIN {
my $verifier = {
S => {
dir => undef,
- assocdb_path => 'cah-assocs.db',
- keys_path => 'cah-keys',
+ assocdb_path => 'caf-assocs.db',
+ keys_path => 'caf-keys',
assocdb_dsn => undef,
assocdb_user => '',
assocdb_password => '',
- assocdb_table => 'assocs',
+ assocdb_table => 'caf_assocs',
random_source => '/dev/urandom',
secretbits => 128, # bits
hash_algorithm => "SHA-256",
login_timeout => 86400, # seconds
login_form_timeout => 3600, # seconds
key_rollover => 86400, # seconds
- assoc_param_name => 'cah_assochash',
- cookie_name => "cah_assocsecret",
+ assoc_param_name => 'caf_assochash',
+ cookie_name => "caf_assocsecret",
password_param_name => 'password',
username_param_names => [qw(username)],
form_entry_size => 60,
- logout_param_names => [qw(cah_logout)],
- login_submit_name => [qw(cah_login)],
- loggedout_param_names => [qw(cah_loggedout)],
+ logout_param_names => [qw(caf_logout)],
+ login_submit_name => [qw(caf_login)],
+ loggedout_param_names => [qw(caf_loggedout)],
promise_check_mutate => 0,
get_param => sub { $_[0]->param($_[2]) },
get_params => sub { $_[1]->get_params() },
=head1 NAME
-CGI::Auth::Hybrid - web authentication optionally using cookies
+CGI::Auth::Flexible - web authentication optionally using cookies
=head1 SYNOPSYS
- my $verifier = CGI::Auth::Hybrid->new_verifier(setting => value,...);
+ my $verifier = CGI::Auth::Flexible->new_verifier(setting => value,...);
my $authreq = $verifier->new_request($cgi_request_object);
- my $authreq = CGI::Auth::Hybrid->new_request($cgi_request_object,
+ my $authreq = CGI::Auth::Flexible->new_request($cgi_request_object,
setting => value,...);
=head1 USAGE PATTERN FOR SIMPLE APPLICATIONS