Apache2-AuthenSecurID
view release on metacpan or search on metacpan
Auth/Auth.pm view on Meta::CPAN
}
}
my $head = qq|
<body>
<head>
<title>SecurID Authentication</title>
<style>
label {
font-family: monospace;
}
p {
font-family: sans-serif;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<html>
<!-- $session_id -->
<form method="post">
<fieldset style="width: 500px; margin-left: auto; margin-right: auto; background: #cccccc;">
<legend>SecurID Authorization</legend>
Auth/Auth.pm view on Meta::CPAN
my $pin1 = $req->param('pin1');
my $pin2 = $req->param('pin2');
my $alphanumeric = $req->param('alphanumeric');
my $min_pin_len = $req->param('min_pin_len');
my $max_pin_len = $req->param('max_pin_len');
my $uri = $req->param('a');
my $message;
my $extra_info = qq{
<span style="font-weight: bold;">User Authenticated</span>
<label for="pin1">PIN :</label>
<input type="password" name="pin1" id="pin1"/>
<input type="hidden" name="type" value="pin"/>
<input type="hidden" name="a" value="$uri"/>
<input type="hidden" name="alphanumeric" value="$alphanumeric"/>
<input type="hidden" name="min_pin_len" value="$min_pin_len"/>
<input type="hidden" name="max_pin_len" value="$max_pin_len"/>
<label for="pin1">PIN ( Again ) :</label>
<input type="password" name="pin2" id="pin2"/>
};
if ( $pin1 != $pin2 ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pins do not match!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
if ($alphanumeric) {
if ( $pin1 =~ /[^0-9a-zA-Z]/ ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be alphanumeric!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
}
else {
if ( $pin1 =~ /[^0-9]/ ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be numeric!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
}
my $pin_length = length($pin1);
if ( $pin_length < $min_pin_len || $pin_length > $max_pin_len ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be the correct length!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
Auth/Auth.pm view on Meta::CPAN
. "/" );
$r->headers_out->add( "Set-Cookie" => $auth_cookie . "="
. $crypt_cookie
. "; path="
. "/" );
$uri = $crypt->decrypt_hex($uri);
# success
$message = qq{
<span style="font-weight: bold;">User Authenticated</span>
<script language="javascript">
window.location="$uri";
</script>
<!-- <p>
If you do not have Java Script enabled<br/>
please click <a href="$uri">here</a> to go to<br/>
the protected page.
</p> -->
<p>
Plase 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.
</p>
};
$extra_input = '';
}
elsif ( $result == 1 ) {
# failure
$message = qq{
<span style="font-weight: bold;">User Authenticated Failed</span>
<p>
Plase 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.
</p>
};
}
elsif ( $result == 100 ) {
# failure
$message = qq{
<span style="font-weight: bold;">User Authenticated Failed</span>
<p>
The ACE server is either down or behaving<br/>
incorrectly. Please conact your system<br/>
administrator.
</p>
};
}
elsif ( $result == 2 ) {
# next token code
$message = qq{
<span style="font-weight: bold;">Next Token Required</span>
<p>
Plase wait for you token to change and enter<br/>
the 6 digit SecurID token code.
</p>
};
$extra_input = qq{
<label for="passcode">Passcode :</label>
<input type="password" name="passcode" id="passcode"/>
<input type="hidden" name="type" value="next"/>
<input type="hidden" name="a" value="$uri"/>
};
}
elsif ( $result == 5 ) {
# New PIN required.
if ( $$info{user_selectable} >= 1 ) {
$message = qq|
<span style="font-weight: bold;">New Pin Required</span>
<p>
Please enter a $$info{min_pin_len} to $$info{max_pin_len} digit pin.
</p>
|;
$extra_input = qq|
<label for="pin1">PIN :</label>
<input type="password" name="pin1" id="pin1"/>
<input type="hidden" name="type" value="pin"/>
<input type="hidden" name="a" value="$uri"/>
<input type="hidden" name="alphanumeric" value="$$info{alphanumeric}"/>
<input type="hidden" name="min_pin_len" value="$$info{min_pin_len}"/>
<input type="hidden" name="max_pin_len" value="$$info{max_pin_len}"/>
<label for="pin1">PIN ( Again ) :</label>
<input type="password" name="pin2" id="pin2"/>
|;
}
else {
$message = qq|
<span style="font-weight: bold;">You have been assigned a new PIN.</span>
<p>
Your PIN is: <$$info{system_pin}</span><p>
Please remember your PIN. Do not share it<br/>
with anyone else.
</p>
<p>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
|;
}
}
elsif ( $result == 6 ) {
$message = qq{
<span style="font-weight: bold;">PIN Accepted</span>
<p>
Please remember you PIN. Do not share it<br/>
with anyone else.
</p>
<p>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
};
}
elsif ( $result == 7 ) {
$message = qq{
<span style="font-weight: bold;">PIN Rejected</span>
<p>
If you're having difficulties, please contact<br/>
the system administrator.<br/><br/>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
};
}
return ( $message, $extra_input );
Auth/RCS/Auth.pm,v view on Meta::CPAN
}
}
my $head = qq|
<body>
<head>
<title>SecurID Authentication</title>
<style>
label {
font-family: monospace;
}
p {
font-family: sans-serif;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<html>
<!-- $session_id -->
<form method="post">
<fieldset style="width: 500px; margin-left: auto; margin-right: auto; background: #cccccc;">
<legend>SecurID Authorization</legend>
Auth/RCS/Auth.pm,v view on Meta::CPAN
my $pin1 = $req->param('pin1');
my $pin2 = $req->param('pin2');
my $alphanumeric = $req->param('alphanumeric');
my $min_pin_len = $req->param('min_pin_len');
my $max_pin_len = $req->param('max_pin_len');
my $uri = $req->param('a');
my $message;
my $extra_info = qq{
<span style="font-weight: bold;">User Authenticated</span>
<label for="pin1">PIN :</label>
<input type="password" name="pin1" id="pin1"/>
<input type="hidden" name="type" value="pin"/>
<input type="hidden" name="a" value="$uri"/>
<input type="hidden" name="alphanumeric" value="$alphanumeric"/>
<input type="hidden" name="min_pin_len" value="$min_pin_len"/>
<input type="hidden" name="max_pin_len" value="$max_pin_len"/>
<label for="pin1">PIN ( Again ) :</label>
<input type="password" name="pin2" id="pin2"/>
};
if ( $pin1 != $pin2 ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pins do not match!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
if ($alphanumeric) {
if ( $pin1 =~ /[^0-9a-zA-Z]/ ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be alphanumeric!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
}
else {
if ( $pin1 =~ /[^0-9]/ ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be numeric!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
}
my $pin_length = length($pin1);
if ( $pin_length < $min_pin_len || $pin_length > $max_pin_len ) {
$message = qq{
<span style="font-weight: bold;">New Pin Required</span>
<p>
Pin must be the correct length!!
</p>
<p>
Please enter a $min_pin_len to $max_pin_len digit pin.
</p>
};
return ( 0, $message, $extra_info );
}
Auth/RCS/Auth.pm,v view on Meta::CPAN
. "/" );
$r->headers_out->add( "Set-Cookie" => $auth_cookie . "="
. $crypt_cookie
. "; path="
. "/" );
$uri = $crypt->decrypt_hex($uri);
# success
$message = qq{
<span style="font-weight: bold;">User Authenticated</span>
<script language="javascript">
window.location="$uri";
</script>
<!-- <p>
If you do not have Java Script enabled<br/>
please click <a href="$uri">here</a> to go to<br/>
the protected page.
</p> -->
<p>
Plase 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.
</p>
};
$extra_input = '';
}
elsif ( $result == 1 ) {
# failure
$message = qq{
<span style="font-weight: bold;">User Authenticated Failed</span>
<p>
Plase 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.
</p>
};
}
elsif ( $result == 100 ) {
# failure
$message = qq{
<span style="font-weight: bold;">User Authenticated Failed</span>
<p>
The ACE server is either down or behaving<br/>
incorrectly. Please conact your system<br/>
administrator.
</p>
};
}
elsif ( $result == 2 ) {
# next token code
$message = qq{
<span style="font-weight: bold;">Next Token Required</span>
<p>
Plase wait for you token to change and enter<br/>
the 6 digit SecurID token code.
</p>
};
$extra_input = qq{
<label for="passcode">Passcode :</label>
<input type="password" name="passcode" id="passcode"/>
<input type="hidden" name="type" value="next"/>
<input type="hidden" name="a" value="$uri"/>
};
}
elsif ( $result == 5 ) {
# New PIN required.
if ( $$info{user_selectable} >= 1 ) {
$message = qq|
<span style="font-weight: bold;">New Pin Required</span>
<p>
Please enter a $$info{min_pin_len} to $$info{max_pin_len} digit pin.
</p>
|;
$extra_input = qq|
<label for="pin1">PIN :</label>
<input type="password" name="pin1" id="pin1"/>
<input type="hidden" name="type" value="pin"/>
<input type="hidden" name="a" value="$uri"/>
<input type="hidden" name="alphanumeric" value="$$info{alphanumeric}"/>
<input type="hidden" name="min_pin_len" value="$$info{min_pin_len}"/>
<input type="hidden" name="max_pin_len" value="$$info{max_pin_len}"/>
<label for="pin1">PIN ( Again ) :</label>
<input type="password" name="pin2" id="pin2"/>
|;
}
else {
$message = qq|
<span style="font-weight: bold;">You have been assigned a new PIN.</span>
<p>
Your PIN is: <$$info{system_pin}</span><p>
Please remember your PIN. Do not share it<br/>
with anyone else.
</p>
<p>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
|;
}
}
elsif ( $result == 6 ) {
$message = qq{
<span style="font-weight: bold;">PIN Accepted</span>
<p>
Please remember you PIN. Do not share it<br/>
with anyone else.
</p>
<p>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
};
}
elsif ( $result == 7 ) {
$message = qq{
<span style="font-weight: bold;">PIN Rejected</span>
<p>
If you're having difficulties, please contact<br/>
the system administrator.<br/><br/>
Please enter your username and passcode<br/>
Your passcode is your 4 - 8 digit pin plus<br/>
6 digit SecurID code.
</p>
};
}
return ( $message, $extra_input );
Auth/RCS/Auth.pm,v view on Meta::CPAN
( $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.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} else {
if ( $type eq "pin" ) {
Auth/RCS/Auth.pm,v view on Meta::CPAN
<form method=post>
<table>
<tr>
<td colspan=2>
<table bgcolor=cccccc >
<tr>
<td>
<table cellspacing=2 bgcolor=dddddd width=100%>
<tr>
<td align=center>
<font size=+2 color=000000 face="Arial, Helvetica, sans-serif">
<b>
SecurID Authorization
</b>
</font>
</td>
</tr>
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
$message
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=right>
<table cellspacing=0 cellpadding=0 bgcolor=dddddd width=100%>
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Username :
</b>
</font>
</td>
<td>
<input type=text name=username value=$username>
</td>
</tr>
$extra_input
</table>
</td>
</tr>
</table>
Auth/RCS/Auth.pm,v view on Meta::CPAN
my $pin2 = $$params{'pin2'};
my $alphanumeric = $$params{'alphanumeric'};
my $min_pin_len = $$params{'min_pin_len'};
my $max_pin_len = $$params{'max_pin_len'};
my $uri = $$params{'a'};
my $message;
my $extra_info = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
PIN :
</b>
</font>
</td>
<td>
<input type=password name=pin1>
<input type=hidden name=type value=pin>
<input type=hidden name=alphanumeric value=$alphanumeric>
<input type=hidden name=min_pin_len value=$min_pin_len>
<input type=hidden name=max_pin_len value=$max_pin_len>
<input type=hidden name=a value=$uri>
</td>
</tr>
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
PIN ( Again ) :
</b>
</font>
</td>
<td>
<input type=password name=pin2>
</td>
</tr>
};
if ( $pin1 != $pin2 ) {
$message = qq{
<b>New Pin Required</b><p>
Auth/RCS/Auth.pm,v view on Meta::CPAN
please click <a href="$uri">here</a> to go to<br>
the protected page.<p>
Plase 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.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} elsif ( $result == 1 ) {
# failure
$message = qq{
<b>User Authentication Failed</b><p>
Plase 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.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} elsif ( $result == 100 ) {
# failure
$message = qq{
<b>User Authentication Failed</b><p>
The ACE server is either down or behaving<br>
incorrectly. Please conact your system<br>
administrator.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} elsif ( $result == 2 ) {
# next token code
$message = qq{
<b>Next Token Required</b><p>
Plase wait for you token to change and enter<br>
the 6 digit SecurID token code.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Next Token Code :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=next>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} elsif ( $result == 5 ) {
# New PIN required.
if ( $$info{user_selectable} >= 1 ) {
$message = qq{
<b>New Pin Required</b><p>
Please enter a $$info{min_pin_len} to $$info{max_pin_len} digit pin.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
PIN :
</b>
</font>
</td>
<td>
<input type=password name=pin1>
<input type=hidden name=type value=pin>
<input type=hidden name=a value=$uri>
<input type=hidden name=alphanumeric value=$$info{alphanumeric}>
<input type=hidden name=min_pin_len value=$$info{min_pin_len}>
<input type=hidden name=max_pin_len value=$$info{max_pin_len}>
</td>
</tr>
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
PIN ( Again ) :
</b>
</font>
</td>
<td>
<input type=password name=pin2>
</td>
</tr>
};
} else {
$message = qq{
<b>You have been assignes a new PIN.</b><p>
Your PIN is: <b>$$info{system_pin}</b><p>
Please remember your PIN. Do not share it<br>
with anyone else.<p>
Please enter your username and passcode<br>
Your passcode is your 4 - 8 digit pin plus<br>
6 digit SecurID code.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
}
} elsif ( $result == 6 ) {
Auth/RCS/Auth.pm,v view on Meta::CPAN
<b>PIN Accepted</b><p>
Please remember you PIN. Do not share it<br>
with anyone else.<p>
Please enter your username and passcode<br>
Your passcode is your 4 - 8 digit pin plus<br>
6 digit SecurID code.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
} elsif ( $result == 7 ) {
$message = qq{
<b>PIN Rejected</b><p>
Please contact the system administrator.<p>
Please enter your username and passcode<br>
Your passcode is your 4 - 8 digit pin plus<br>
6 digit SecurID code.
};
$extra_input = qq{
<tr>
<td>
<font color=000000 face="Arial, Helvetica, sans-serif">
<b>
Passcode :
</b>
</font>
</td>
<td>
<input type=password name=passcode>
<input type=hidden name=type value=check>
<input type=hidden name=a value=$uri>
</td>
</tr>
};
d360 44
a404 3
Auth/RCS/Auth.pm,v view on Meta::CPAN
1.7
log
@*** empty log message ***
@
text
@d1 1
a1 1
# $Id: Auth.pm,v 1.6 2001/06/22 19:09:01 root Exp $
d58 1
a58 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d93 1
a93 1
<table bgcolor=FFFF00 >
d96 1
a96 1
<table cellspacing=2 bgcolor=00008B width=100%>
d99 1
a99 1
<font size=+2 color=ffffff face="Arial, Helvetica, sans-serif">
d108 1
a108 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d118 1
a118 1
<table cellspacing=0 cellpadding=0 bgcolor=00008B width=100%>
d121 1
a121 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d173 1
a173 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d190 1
a190 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d322 1
a322 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d347 1
a347 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d371 1
a371 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d394 1
a394 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d417 1
a417 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d434 1
a434 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d459 1
a459 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d485 1
a485 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
d510 1
a510 1
<font color=ffffff face="Arial, Helvetica, sans-serif">
@
1.6
log
@docs
@
text
@d1 1
a1 1
( run in 0.809 second using v1.01-cache-2.11-cpan-5735350b133 )