perl/keyring/kdewallet /

Filename Size Date modified Message
54 B
139 B
382 B
1.3 KB
853 B
1.1 KB
461 B
1.3 KB
2.8 KB
134 B
4.4 KB
    Passwd::Keyring::KDEWallet - Password storage implementation based on
    KDE Wallet.

    Version 0.2006

    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, "");
        unless( $password ) {
            $password = <somehow interactively prompt for password>;

            # securely save password for future use
            $keyring->set_password($username, $password, "");

        login_somewhere_using($username, $password);
        if( password_was_wrong ) {
            $keyring->clear_password($username, "");

    Note: see Passwd::Keyring::Auto::KeyringAPI for detailed comments on
    keyring method semantics (this document is installed with
    `Passwd::Keyring::Auto' package).

  new(app=>'app name', group=>'passwords folder')
    Initializes the processing. Croaks if kwallet (or d-bus, or anything
    needed) 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)

  set_password(username, password, realm)
    Sets (stores) password identified by given realm for given user

  get_password($user_name, $realm)
    Reads previously stored password for given user in given app. If such
    password can not be found, returns undef.

  clear_password($user_name, $realm)
    Removes given password (if present)

    Returns info, whether this keyring actually saves passwords

    (true in this case)

    Marcin Kasperski

    Approach inspired by

    Please report any bugs or feature requests to issue tracker at

    You can find documentation for this module with the perldoc command.

        perldoc Passwd::Keyring::KDEWallet

    You can also look for information at:

    Source code is tracked at:

    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 for more information.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.