Apache-AuthenSecurID
view release on metacpan or search on metacpan
RCS/AuthenSecurID.pm,v view on Meta::CPAN
head 1.6;
access;
symbols;
locks;
comment @# @;
1.6
date 2002.07.31.16.43.44; author Administrator; state Exp;
branches;
next 1.5;
1.5
date 2002.07.30.20.15.39; author Administrator; state Exp;
branches;
next 1.4;
1.4
date 2001.06.22.19.08.36; author root; state Exp;
branches;
next 1.3;
1.3
date 2001.06.21.14.50.24; author root; state Exp;
branches;
next 1.2;
1.2
date 2001.06.19.19.05.42; author root; state Exp;
branches;
next 1.1;
1.1
date 2001.06.15.18.45.42; author root; state Exp;
branches;
next ;
desc
@Created
@
1.6
log
@*** empty log message ***
@
text
@# $Id: AuthenSecurID.pm,v 1.5 2002/07/30 20:15:39 Administrator Exp $
package Apache::AuthenSecurID;
use strict;
use Apache ();
use Apache::Registry;
use Apache::Log;
use Apache::Constants qw(OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR);
use Apache::Cookie;
use Crypt::CBC;
use CGI::Carp;
use vars qw($VERSION);
$VERSION = '0.4';
sub handler {
my $r = shift;
# get configuration directives
my $auth_cookie = $r->dir_config("AuthCookie") || "SecurID";
my $auth_user_cookie = $r->dir_config("AuthUserCookie")||"SecurID_User";
my $crypt_key = $r->dir_config("AuthCryptKey") || "my secret";
my $cookie_timeout = $r->dir_config("AuthCookieTimeOut") || 30;
my $cookie_path = $r->dir_config("AuthCookiePath") || "/";
my $auth_handler = $r->dir_config("Auth_Handler") || "/ace_init";
# get cookies
my ( $session_key ) = ( ($r->header_in("Cookie") || "") =~
/${auth_cookie}=([^;]+)/);
my ( $session_user ) = ( ($r->header_in("Cookie") || "") =~
/${auth_user_cookie}=([^;]+)/);
RCS/AuthenSecurID.pm,v view on Meta::CPAN
=head1 CONFIGURATION
The module should be loaded upon startup of the Apache daemon.
Add the following line to your httpd.conf:
PerlModule Apache::AuthenSecurID
=head1 PREREQUISITES
For AuthenSecurID you need to enable the appropriate call-back hook
when making mod_perl:
perl Makefile.PL PERL_AUTHEN=1
AuthenSecurID requires Crypt::Blowfish and Crypt::CBC.
=head1 SEE ALSO
L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>
=head1 AUTHORS
=item *
mod_perl by Doug MacEachern <dougm@@osf.org>
=item *
Authen::ACE by Dave Carrigan <Dave.Carrigan@@iplenergy.com>
=item *
Apache::AuthenSecurID by David Berk <dberk@@lump.org>
=head1 COPYRIGHT
The Apache::AuthenSecurID module is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
=cut
@
1.5
log
@*** empty log message ***
@
text
@d1 1
a1 1
# $Id: AuthenSecurID.pm,v 1.4 2001/06/22 19:08:36 root Exp $
d85 2
@
1.4
log
@documentation
@
text
@d1 1
a1 1
# $Id: AuthenSecurID.pm,v 1.3 2001/06/21 14:50:24 root Exp root $
d96 1
a96 1
PerlSetVar AuthCookieHandler /path/of/authentication/handler
d146 1
a146 1
AuthCookieHandler
@
1.3
log
@many fixes
@
text
@d1 1
a1 1
# $Id: AuthenSecurID.pm,v 1.2 2001/06/19 19:05:42 root Exp root $
a18 7
# Continue only if the first request.
#return OK unless $r->is_initial_req;
#my $reqs_arr = $r->requires;
#return OK unless $reqs_arr;
#my $log = $r->log;
a19 1
# Grab the password, or return if HTTP_UNAUTHORIZED
d21 1
d28 1
d32 1
d46 1
a46 1
( $username, $session_time ) = split /\:/, $plaintext_cookie;
a48 1
# check cookie
d53 1
d57 3
a59 2
$r->err_header_out( "Pragma" => "no-cache" );
my $crypt_cookie = $cipher->encrypt_hex ( "$username:$time" );
d61 1
a61 1
$crypt_cookie . "; path=" . "/");
d64 1
d83 1
a83 5
# Configuration in httpd.conf
PerlModule Apache::AuthenSecurID
# Authentication in .htaccess
d85 1
a88 1
# authenticate via SecurID
d91 1
a91 1
PerlSetVar Auth_SecurID_VAR_ACE /ace/config/directory
d93 1
d95 2
d99 1
( run in 1.839 second using v1.01-cache-2.11-cpan-5a3173703d6 )