Apache-AuthCookieDBI
view release on metacpan or search on metacpan
AuthCookieDBI.pm view on Meta::CPAN
$c{DBI_userfield} = _dir_config_var( $r, 'DBI_UserField' )
|| 'user';
=item C<WhatEverDBI_PasswordField>
The field in the above table that has the password. This is not
required and defaults to 'password'.
=cut
$c{DBI_passwordfield} = _dir_config_var( $r, 'DBI_PasswordField' )
|| 'password';
=item C<WhatEverDBI_CryptType>
What kind of hashing is used on the password field in the database. This can
be 'none', 'crypt', or 'md5'. This is not required and defaults to 'none'.
=cut
$c{DBI_crypttype} = _dir_config_var( $r, 'DBI_CryptType' )
|| 'none';
=item C<WhatEverDBI_GroupsTable>
The table that has the user / group information. This is not required and
defaults to 'groups'.
=cut
$c{DBI_groupstable} = _dir_config_var( $r, 'DBI_GroupsTable' )
|| 'groups';
=item C<WhatEverDBI_GroupField>
The field in the above table that has the group name. This is not required
and defaults to 'grp' (to prevent conflicts with the SQL reserved word 'group').
=cut
$c{DBI_groupfield} = _dir_config_var( $r, 'DBI_GroupField' )
|| 'grp';
=item C<WhatEverDBI_GroupUserField>
The field in the above table that has the user name. This is not required
and defaults to 'user'.
=cut
$c{DBI_groupuserfield} = _dir_config_var( $r, 'DBI_GroupUserField' )
|| 'user';
=item C<WhatEverDBI_SecretKeyFile - DEPRECATED>
The file that contains the secret key (on the first line of the file). This
is required and has no default value. This key should be owned and only
readable by root. It is read at server startup time. The key should be long
and fairly random. If you want, you can change it and restart the server,
(maybe daily), which will invalidate all prior-issued tickets.
This directive MUST be set before the PerlModule line that loads this module,
because the secret key file is read immediately (at server start time). This
is so you can have it owned and only readable by root even though Apache
then changes to another user.
I suggest using DBI_SecretKey instead.
=cut
unless ( $c{DBI_secretkeyfile} = _dir_config_var $r, 'DBI_SecretKeyFile'
or _dir_config_var $r, 'DBI_SecretKey' )
{
_log_not_set $r, 'DBI_SecretKeyFile or DBI_SecretKey';
return;
}
=item C<WhatEverDBI_EncryptionType>
What kind of encryption to use to prevent the user from looking at the fields
in the ticket we give them. This is almost completely useless, so don't
switch it on unless you really know you need it. It does not provide any
protection of the password in transport; use SSL for that. It can be 'none',
'des', 'idea', 'blowfish', or 'blowfish_pp'.
This is not required and defaults to 'none'.
=cut
$c{DBI_encryptiontype} = _dir_config_var( $r, 'DBI_EncryptionType' )
|| 'none';
# If we used encryption we need to pull in Crypt::CBC.
if ( $c{DBI_encryptiontype} ne 'none' ) {
require Crypt::CBC;
}
=item C<WhatEverDBI_SessionLifetime>
How long tickets are good for after being issued. Note that presently
Apache::AuthCookie does not set a client-side expire time, which means that
most clients will only keep the cookie until the user quits the browser.
However, if you wish to force people to log in again sooner than that, set
this value. This can be 'forever' or a life time specified as:
DD-hh-mm-ss -- Days, hours, minute and seconds to live.
This is not required and defaults to '00-24-00-00' or 24 hours.
=cut
$c{DBI_sessionlifetime} = _dir_config_var( $r, 'DBI_SessionLifetime' )
|| '00-24-00-00';
return %c;
}
#-------------------------------------------------------------------------------
# _now_year_month_day_hour_minute_second -- Return a string with the time in
# this order separated by dashes.
( run in 2.734 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )