Passwd::Keyring::KDEWallet - Password storage implementation based on KDE Wallet.
Version 0.2002
KDE Wallet based implementation of Passwd::Keyring.
use Passwd::Keyring::KDEWallet; my $keyring = Passwd::Keyring::KDEWallet->new( app=>"blahblah scraper", group=>"Johnny web scrapers", ); my $username = "John"; # or get from .ini, or from .argv... my $password = $keyring->get_password($username, "blahblah.com"); unless( $password ) { $password = <somehow interactively prompt for password>; # securely save password for future use $keyring->set_password($username, "blahblah.com"); } login_somewhere_using($username, $password); if( password_was_wrong ) { $keyring->clear_password($username, "blahblah.com"); }
Note: see Passwd::Keyring::Auto::KeyringAPI for detailed comments on keyring method semantics (this document is installed with Passwd::Keyring::Auto package).
Passwd::Keyring::Auto
Initializes the processing. Croaks if kwallet does not seem to be available.
Handled named parameters:
- app - symbolic application name (used in "Application .... is asking to open the wallet" KDE Wallet prompt)
- group - name for the password group (used as KDE Wallet folder name)
Sets (stores) password identified by given domain for given user
Reads previously stored password for given user in given app. If such password can not be found, returns undef.
Removes given password (if present)
Returns info, whether this keyring actually saves passwords persistently.
(true in this case)
Marcin Kasperski
Approach inspired by http://www.perlmonks.org/?node_id=869620.
Please report any bugs or feature requests to issue tracker at https://bitbucket.org/Mekk/perl-keyring-kdewallet.
You can find documentation for this module with the perldoc command.
perldoc Passwd::Keyring::KDEWallet
You can also look for information at:
http://search.cpan.org/~mekk/Passwd-Keyring-KDEWallet/
Source code is tracked at:
https://bitbucket.org/Mekk/perl-keyring-kdewallet
Copyright 2012 Marcin Kasperski.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Passwd::Keyring::KDEWallet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Passwd::Keyring::KDEWallet
CPAN shell
perl -MCPAN -e shell install Passwd::Keyring::KDEWallet
For more information on module installation, please visit the detailed CPAN module installation guide.