
Aut::Backend::Conf - A Config::Frontend backend to Aut.

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,
);
(...)

'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.).

new(Config::Frontend) --> Aut::Backend::ConfThis method instantiates a new Aut::Backend::Conf object with given Conf::Frontend object.
get_keys() --> (list public_key:string private_key:string)This function returns the currently stored RSA KeyPair in the backend, or
undefif they do not exist.
has_accounts() --> booleanReturns true, if there are any accounts stored in the backend, returns false, otherwise.
get_all_accounts() --> (list account:string)Returns all accounts stored in the backend as a list of strings.
pass_ok(account:string, given_pass:string) --> booleanReturns true, if the password given for the account is valid. Returns false, otherwise.
exists(account:string) --> booleanReturns true, if account exists in the backend; false otherwise.
get_rsa_pass(account:string) --> rsa_cipher_textReturns the with RSA public key encrypted password for an account, or undef if account does not exist.
get_rights(account:string) --> stringReturns the rights stored for an account, or undef if account does not exist.
get_seed(account:string) --> stringReturns the seed stored for an account, or undef if account does not exist.
get_sr_hash(account:string) --> stringReturns the stored MD5 hash over the concatenation of rights and seed, or undef if account does not exist.
set_keys(public:string,private:string) --> voidStores the RSA keypair as given by public and private.
set_rsa_pass( account:string, pass:rsa_cipher_text(string) ) --> voidStores the with the RSA public key encrypted password for account.
set_rights(account:string, rights:string) --> voidStores the rights for an account.
set_seed(account:string, seed:string) --> voidStores the seed that is used for keys for an account.
set_sr_hash(account:string, hash:md5_base64(string) ) --> voidStores the MD5 hash that has been calculated over the concatenation of rights and seed.
del_account(account:string) --> voidDeletes account from the backend.


Hans Oesterholt-Dijkema <oesterhol@cpan.org>

This library is free software; you can redistribute it and/or modify it under Artistic license