Aut
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
Aut/Backend/Conf.pm view on Meta::CPAN
}
1;
__END__
=head1 NAME
Aut::Backend::Conf - A Config::Frontend backend to Aut.
=head1 SYNOPSIS
use Aut;
use Aut::UI::Console;
use Aut::Backend::Conf;
use Config::Frontend;
use Config::Backend::INIREG;
use strict;
my $cfg=new Config::Frontend(new Config::Backend::INIREG("Application"));
my $backend=new Aut::Backend::Conf($cfg);
my $ui=new Aut::UI::Console();
my $aut=new Aut( Backend => $backend,
UI => $ui,
);
(...)
=head1 ABSTRACT
'Aut::Backend::Conf' is part of the 'Aut' authorization framework.
It provides the a Config::Frontend Aut backend for storing and
fetching account related information.
This module can be used as an example module for implementing
Aut backends. As it is, it isn't secure enough to be a real
Aut backend, because if someone wants to do harm, he/she can just
delete e.g. the private key from the configuration file.
A secure backend would be using more secure backends, like implementing
it directly on top of an other account system (passwd, SAM, database
user access tables, etc.).
=head1 DESCRIPTION
=head2 Instantiating
=head3 C<new(Config::Frontend) --E<gt> Aut::Backend::Conf>
=over 1
This method instantiates a new Aut::Backend::Conf object with
given L<Conf::Frontend> object.
=back
=head2 Querying
=head3 C<get_keys() --E<gt> (list public_key:string private_key:string)>
=over 1
This function returns the currently stored RSA KeyPair in the backend,
or C<undef> if they do not exist.
=back
=head3 C<has_accounts() --E<gt> boolean>
=over 1
Returns true, if there are any accounts stored in the backend, returns
false, otherwise.
=back
=head3 C<get_all_accounts() --E<gt> (list account:string)>
=over 1
Returns all accounts stored in the backend as a list of strings.
=back
=head3 C<pass_ok(account:string, given_pass:string) --E<gt> boolean>
=over 1
Returns true, if the password given for the account is valid.
Returns false, otherwise.
=back
=head3 C<exists(account:string) --E<gt> boolean>
Returns true, if account exists in the backend; false otherwise.
=head2 Retreiving account information
=head3 C<get_rsa_pass(account:string) --E<gt> rsa_cipher_text>
=over 1
Returns the with RSA public key encrypted password for an account,
or undef if account does not exist.
=back
=head3 C<get_rights(account:string) --E<gt> string>
=over 1
Returns the rights stored for an account,
or undef if account does not exist.
=back
=head3 C<get_seed(account:string) --E<gt> string>
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.682 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )