Apache2-AuthenSecurID
view release on metacpan or search on metacpan
Auth/RCS/Auth.pm,v view on Meta::CPAN
1.10
date 2007.12.08.03.19.43; author atobey; state Exp;
branches;
next 1.9;
1.9
date 2002.07.31.16.44.14; author Administrator; state Exp;
branches;
next 1.8;
1.8
date 2002.07.30.20.31.10; author Administrator; state Exp;
branches;
next 1.7;
1.7
date 2002.07.30.20.16.01; author Administrator; state Exp;
branches;
next 1.6;
1.6
date 2001.06.22.19.09.01; author root; state Exp;
branches;
next 1.5;
1.5
date 2001.06.22.18.15.02; author root; state Exp;
branches;
next 1.4;
1.4
date 2001.06.19.19.39.39; author root; state Exp;
branches;
next 1.3;
1.3
date 2001.06.19.19.05.36; author root; state Exp;
branches;
next 1.2;
1.2
date 2001.06.15.18.17.42; author root; state Exp;
branches;
next 1.1;
1.1
date 2001.06.15.17.57.04; author root; state Exp;
branches;
next ;
desc
@Created
@
1.10
log
@Ported to mod_perl2 and updated HTML.
@
text
@# $Id: Auth.pm,v 1.9 2002/07/31 16:44:14 Administrator Exp $
package Apache2::AuthenSecurID::Auth;
use strict;
use ModPerl::Registry;
use Apache2::porting;
use Apache2::Request;
use Apache2::Const qw(:common);
use IO::Socket::INET;
use Crypt::CBC;
use CGI qw(:standard);
use vars qw($VERSION);
$VERSION = '0.5';
sub handler {
my $r = shift;
my $req = Apache2::Request->new($r);
# seed the random number generator
srand( time ^ $$ ^ unpack "%L*", `ps axww | gzip -f` );
#get params
my $username = $req->param('username');
my $passcode = $req->param('passcode');
my $type = $req->param('type');
my $uri = $req->param('a');
# get ace_initd config directives
my $ace_initd_server = $r->dir_config("ace_initd_server") || "localhost";
my $ace_initd_port = $r->dir_config("ace_initd_port") || 1969;
# grab apache session cookie
my ($session_id) =
( ( $r->headers_in->{"Cookie"} || "" ) =~ /Apache=([^;]+)/ );
my $client = IO::Socket::INET->new(
PeerAddr => $ace_initd_server,
PeerPort => $ace_initd_port,
Proto => 'udp'
);
my %ACE;
my $request;
my $message;
my $extra_input;
if ( ( !$username && !$passcode )
|| ( $type ne "pin" && !$passcode )
|| ( $passcode =~ /\:/ ) )
{
$message = qq{
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code. If you do not have<br/>
a PIN yet just enter the 6 digit SecurID code.
};
( run in 0.508 second using v1.01-cache-2.11-cpan-39bf76dae61 )