WebAuth::KeyringEntry

(A single entry in a WebAuth::Keyring)

SYNOPSIS

    use WebAuth ();
    use WebAuth::Keyring ();

    my $wa = WebAuth->new;
    eval {
        $ring = WebAuth::Keyring->read ($wa, '/path/to/keyring');
        my @entries = $ring->entries;
        for my $entry (@entries) {
            print $entry->creation, ' ', $entry->valid_after, "\n";
        }
    };
    if ($@) {
        # handle exception
    }

DESCRIPTION

A WebAuth::KeyringEntry represents a single entry in a WebAuth::Keyring. Calling the entries() method on a WebAuth::Keyring in an array context returns a list of these objects. They encapsulate the WebAuth::Key and the additional metadata about that key stored in a keyring, specifically the creation and valid-after timestamps.

This object is always read-only.

A WebAuth::KeyringEntry object will be destroyed when the corresponding WebAuth::Keyring object is destroyed, which in turn will happen when the WebAuth context used to create it is destroyed. Subsequent accesses to it may cause memory access errors or other serious bugs. Be careful not to retain a copy of a WebAuth::KeyringEntry object after the enclosing objects that created it have been destroyed.

INSTANCE METHODS

creation ()

Returns the creation time of the key in seconds since epoch.

key ()

Returns the key of this entry as a WebAuth::Key object.

valid_after ()

Returns the valid-after time of the key in seconds since epoch. For more information about how the valid-after time is used, see the documentation of the add() and best_key() methods of WebAuth::Keyring.

AUTHOR

Russ Allbery <eagle@eyrie.org>

SEE ALSO

WebAuth(3), WebAuth::Key(3), WebAuth::Keyring(3)

This module is part of WebAuth. The current version is available from <http://webauth.stanford.edu/>.

COPYRIGHT AND LICENSE

Copyright 2012 The Board of Trustees of the Leland Stanford Junior University

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Last spun 2015-02-17 from POD modified 2015-02-16