Jon Connell > Finance-Bank-Cahoot-1.07 > Finance::Bank::Cahoot::CredentialsProvider::ReadLine

Download:
Finance-Bank-Cahoot-1.07.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.07   Source  

NAME ^

 Finance::Bank::Cahoot::CredentialsProvider::ReadLine - Console-based credentials provider

SYNOPSIS ^

  my $credentials =  Finance::Bank::Cahoot::CredentialsProvider::ReadLine->new(
     account => '12345678', username => 'acmeuser',
     password_prompt => 'Enter character %d of your password: '
  );

DESCRIPTION ^

This module provides a Term::ReadLine implementation of a credentials provider for console entry of credentials. Each credentials method can be overridden by a constant parameter to reduce the amount of console interaction with the user in the case of less security sensitive data such as a username. In addition to the value overrides, the text prompt for each readline method can also be overridden.

METHODS ^

new

Create a new instance of the credentials provider.

credentials is an array ref of all the credentials types available via the credentials provider.
options is a hash ref of optional default values and prompts for each credential. Prompts are provided in options using keys of the form credential_prompt.
  my $credentials =  Finance::Bank::Cahoot::CredentialsProvider::ReadLine->new(
     account => '12345678', username => 'acmeuser',
     password_prompt => 'Enter character %d of your password: '
  );
get

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

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

AUTHOR ^

Jon Connell <jon@figsandfudge.com>

LICENSE AND COPYRIGHT ^

This module borrows heavily from Finance::Bank::Natwest by Jody Belka.

Copyright 2007 by Jon Connell Copyright 2003 by Jody Belka

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: