Apache2-AuthenSecurID
view release on metacpan or search on metacpan
RCS/AuthenSecurID.pm,v view on Meta::CPAN
head 1.7;
access;
symbols;
locks;
comment @# @;
1.7
date 2007.12.08.03.20.58; author atobey; state Exp;
branches;
next 1.6;
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.7
log
@Ported to mod_perl2 and other misc changes.
@
text
@# $Id: AuthenSecurID.pm,v 1.6 2002/07/31 16:43:44 Administrator Exp $
package Apache2::AuthenSecurID;
use strict;
use Apache2::Const qw(OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR);
use Apache2::RequestUtil ();
use Apache2::RequestRec ();
use Apache2::Cookie;
use Crypt::CBC;
use CGI::Carp;
use vars qw($VERSION);
$VERSION = '0.5';
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->headers_in->{Cookie} || "") =~
/${auth_cookie}=([^;]+)/);
my ( $session_user ) = ( ($r->headers_in->{Cookie} || "") =~
/${auth_user_cookie}=([^;]+)/);
RCS/AuthenSecurID.pm,v view on Meta::CPAN
use Apache::Log;
use Apache::Constants qw(OK AUTH_REQUIRED DECLINED REDIRECT SERVER_ERROR);
use Apache::Cookie;
d14 1
a14 1
$VERSION = '0.4';
d32 1
a32 1
my ( $session_key ) = ( ($r->header_in("Cookie") || "") =~
d34 1
a34 1
my ( $session_user ) = ( ($r->header_in("Cookie") || "") =~
d66 2
a67 2
$r->err_header_out("Pragma" => "no-cache");
$r->header_out("Location" => "$auth_handler?a=" . $uri );
d78 1
a78 1
Apache::AuthenSecurID - Authentication via a SecurID server
d84 1
a84 1
PerlModule Apache::AuthenSecurID
d90 1
a90 1
PerlAuthenHandler Apache::AuthenSecurID
d157 1
a157 1
Apache::AuthenSecurID::Auth to properly configure this functionality.
d164 1
a164 1
PerlModule Apache::AuthenSecurID
d177 1
a177 1
L<Apache>, L<mod_perl>, L<Authen::ACE> L<Apache::AuthenSecurID::Auth>
d190 3
d195 1
a195 1
The Apache::AuthenSecurID module is free software; you can redistribute
@
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 2.208 seconds using v1.01-cache-2.11-cpan-98e64b0badf )