Apache2-AuthenSecurID

 view release on metacpan or  search on metacpan

Auth/Auth.pm  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{
            <label for="passcode">Passcode :</label>
            <input type="password" name="passcode" id="passcode"/>
            <input type="hidden" name="type" value="check"/>
            <input type="hidden" name="a" value="$uri"/>
        };
    }
    else {
        if ( $type eq "pin" ) {
            ( $passcode, $message, $extra_input ) = check_pin( $r, $req );
            if ($passcode) {
                ( $message, $extra_input ) =
                  Do_ACE( $username, $passcode, $type, $session_id, $client, $r, $req );

Auth/Auth.pm  view on Meta::CPAN

    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.

Auth/Auth.pm  view on Meta::CPAN


}

sub Ace_Result {

    my ( $result, $info, $r, $crypt, $req, $username ) = @_;
    my $message;
    my $uri  = $req->param('a');
    my $extra_input = qq{
        <label for="passcode">Passcode :</label>
        <input type="password" name="passcode" id="passcode"/>
        <input type="hidden" name="type" value="check"/>
        <input type="hidden" name="a" value="$uri"/>
    };
    my $time = time();

    if ( $result == 0 ) {

        my $auth_cookie = $r->dir_config("AuthCookie") || "SecurID";
        my $auth_user_cookie = $r->dir_config("AuthUserCookie")
          || "SecurID_User";

Auth/Auth.pm  view on Meta::CPAN

        # 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.

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{
            <label for="passcode">Passcode :</label>
            <input type="password" name="passcode" id="passcode"/>
            <input type="hidden" name="type" value="check"/>
            <input type="hidden" name="a" value="$uri"/>
        };
    }
    else {
        if ( $type eq "pin" ) {
            ( $passcode, $message, $extra_input ) = check_pin( $r, $req );
            if ($passcode) {
                ( $message, $extra_input ) =
                  Do_ACE( $username, $passcode, $type, $session_id, $client, $r, $req );

Auth/RCS/Auth.pm,v  view on Meta::CPAN

    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.

Auth/RCS/Auth.pm,v  view on Meta::CPAN


}

sub Ace_Result {

    my ( $result, $info, $r, $crypt, $req, $username ) = @@_;
    my $message;
    my $uri  = $req->param('a');
    my $extra_input = qq{
        <label for="passcode">Passcode :</label>
        <input type="password" name="passcode" id="passcode"/>
        <input type="hidden" name="type" value="check"/>
        <input type="hidden" name="a" value="$uri"/>
    };
    my $time = time();

    if ( $result == 0 ) {

        my $auth_cookie = $r->dir_config("AuthCookie") || "SecurID";
        my $auth_user_cookie = $r->dir_config("AuthUserCookie")
          || "SecurID_User";

Auth/RCS/Auth.pm,v  view on Meta::CPAN

        # 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.

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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" ) {
		( $passcode, $message,$extra_input) = check_pin ( \%params ) ;
		if ( $passcode )  {
			($message,$extra_input) = Do_ACE($username,$passcode,$type,$session_id,$client,$r,\%params);

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	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>
		Pins do not match!!<p>
		Please enter a $min_pin_len to $max_pin_len digit pin.
	   };

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	   $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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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 ) {
	$message = qq{
		<b>PIN Accepted</b><p>
		Please remember you PIN.  Do not share it<br> 

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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>

Auth/RCS/Auth.pm,v  view on Meta::CPAN

	$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
	return ( $message, $extra_input );
}

RCS/AuthenSecurID.pm,v  view on Meta::CPAN

# $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

RCS/AuthenSecurID.pm,v  view on Meta::CPAN

		return AUTH_REQUIRED;
	}

	if ( ! $pass ) {
		$r->log_reason("Apache::AuthenSecurID passcode empty",$r->uri);
		$r->note_basic_auth_failure;
		return AUTH_REQUIRED;
	}

	if (length $pass > 256) {
		$r->log_reason("Apache::AuthenSecurID password too long",$r->uri);
		$r->note_basic_auth_failure;
		return AUTH_REQUIRED;
	}

	# Create the SecurID connection.
	my $ace = Authen::ACE->new(
		config => $VAR_ACE 
	) || warn ( $! );

	# Error if we can't connect.



( run in 0.724 second using v1.01-cache-2.11-cpan-49f99fa48dc )