Finance::Bank::Cahoot::CredentialsProvider::CryptFile - Credentials provider for encrypted stored data


Finance-Bank-Cahoot documentation  | view source Contained in the Finance-Bank-Cahoot distribution.

Index


NAME

Top

 Finance::Bank::Cahoot::CredentialsProvider::CryptFile - Credentials provider for encrypted stored data

SYNOPSIS

Top

  my $credentials = Finance::Bank::Cahoot::CredentialsProvider::CrpytFile->new(
     credentials => [qw(account password)],
     options => {key => 'verysecret', keyfile => '/etc/cahoot'});

DESCRIPTION

Top

Provides a credentials provider that uses credentials stored in an encrypted file. Each credential is available with its own access method of the same name. All methods may be optionally supplied a character offset in the credentials value (first character is 0).

METHODS

Top

new

Create a new instance of a static data credentials provider.

credentials is an array ref of all the credentials types available via the credentials provider.
options a hash ref of options for the credentials provider.

key Is the text passphrase for encrypting/decrypting the credentials store.
keyfile is an optional path to the credentials store. The default store is $HOME/.cahoot.
fallback is the name of a Finance::Bank::Cahoot::CredentialsProvider credentials provider to use for any credentials that are not present in the encrypted store. Newly discovered credentials and encrypted and written back to the store.
fallback_options is a hash ref that is passed to the fallback credentials provider's constructor as options.
  my $provider =
    Finance::Bank::Cahoot::CredentialsProvider::CryptFile->new(
      credentials => [qw(account username password)],
      options => { key => 'verysecret',
		   keyfile => '/etc/cahoot,
		   fallback => 'Constant',
		   fallback_options => { account => '12345678',
			 		 username => 'acmeuser',
				 	 password => 'secret' } });

get

Returns a credential value whose name is passed as the first parameter. An optional character offset (0 is the first character) may also be provided.

  my $password_char = $provider->password(5);

AUTHOR

Top

Jon Connell <jon@figsandfudge.com>

LICENSE AND COPYRIGHT

Top


Finance-Bank-Cahoot documentation  | view source Contained in the Finance-Bank-Cahoot distribution.