Authen-ACE4

 view release on metacpan or  search on metacpan

ACE4.pm  view on Meta::CPAN


    return SD_Check($self->{sd}, $passcode, $username);
}

sub new {
    my $type = shift;
    my $self = {};

    $ENV{"VAR_ACE"} = "/var/ace" unless defined($ENV{"VAR_ACE"});

    if (Authen::ACE4::AceInitialize() != 1) {
        die "Could not read ACE client configuration file in " .
	    $ENV{"VAR_ACE"} . "\n";
    }

    $self->{sd} = 0;
    if (SD_Init($self->{sd}) != Authen::ACE4::ACM_OK()) {
      die "Failed call to SD_Init\n";
    }

    bless $self, $type;
}

sub DESTROY {
    my $self = shift;

    SD_Close($self->{sd});
}


1;
__END__
=pod

=head1 NAME

Authen::ACE4 - Perl extension for accessing a SecurID ACE server or RSA Authenticaiotn Manager

=head1 SYNOPSIS

use Authen::ACE4;
AceInitialize();
($result, $handle, $moreData, $echoFlag, $respTimeout, 
 $nextRespLen, $prompt)
    = AceStartAuth($username);
($result, $moreData, $echoFlag, $respTimeout, 
 $nextRespLen, $prompt) 
    = Authen::ACE4::AceContinueAuth($handle, $resp);
($result, $status) 
    = Authen::ACE4::AceGetAuthenticationStatus($handle);
$result = AceCloseAuth($handle);

=head1 DESCRIPTION

Authen::ACE4 provides a client interface to a Security Dynamics SecurID
ACE server. It uses the ACE/Agent client libraries.
SecurID authentication can be added to any Perl
application using Authen::ACE4.

Synchronous functions are provided for authenticating users and
getting some user information.  Asynchronous functions are not
supported. ACE/Agent Version 4.1 and better API is supported. Legacy
functions like sd_auth etc are not supported.

=head1 METHODS

=over 4

=item AceInitialize

AceInitialize();

Initializes the ACE client access library and loads the ACE
configuration file (sdconf.rec). AceInitialize must be called
before any other API function is called.

On Unix, the environment variable VAR_ACE is used to find
the ACE/Server sdconf.rec file, which specifies how to
contact the ACE server and/or Authentication Manager. The
default is /var/ace/data. If your sdconf.rec is in a different location
you must specify VAR_ACE eg:

    $ENV{VAR_ACE} = '/opt/ace/data';

before calling AceInitialize.

=item AceStartAuth

($result, $handle, $moreData, $echoFlag, $respTimeout, 
$nextRespLen, $prompt) 
    = Authen::ACE4::AceStartAuth($username);

The AceStartAuth function is designed to be used aling with 
AceContinueAuth and AceCloseAuth.

AceStartAuth is the first step in authenticating a user. If the
function returns successfully, continue to call AceContinueAuth as
long as $moreData is true.

If AceStartAuth returns successfully, AceCloseAuth must be called
to close the authentication context. If AceStartAuth 
does not return successfully, AceCloseAuth must not be called.

You can have multiple authentication contexts (handles) current
at the same time. Each one must be closed with its own AceCloseAuth.

Input data is

=over 4

=item username

The name of the user to be authenticated, as known to the ACE/Server.

=back

Returned data is

=over 4

=item result



( run in 0.636 second using v1.01-cache-2.11-cpan-39bf76dae61 )