NAME

Ucam::WebAuth::Ticket - Perl extension for managing 'Tickets'


SYNOPSIS

    my $tkt = Ucam::WebAuth::Ticket->new(
                           fields => [qw(ver principal auth sso issue)],
                           sigtype => 'HASH',
                           key => 'AAbbCC',
                           dflt_key => 1,
                          );

$tkt->principal('fred');
    print $tkt->principal, "\n";
    my $token = $tkt->as_token;
    $tkt->import_token(token => $new_token);
    print $tkt->principal, "\n";


DESCRIPTION

This module implements a generic 'Ticket' object. A ticket contains keyword/value pairs (only one value per keyword, values constrained to be strings). Tickets can be serialized and de-serialized into the form of a URL query protected by a signature. Field names, signature types and keys are established at object creation and no facilities are provided to query or change them subsequently. Getter/setter methods are automatically available for all the fields defined for the ticket.

Most methods return 'undef' and record a log entry on error. In addition for object methods a description of the last error can be retrieved by calling last_error

More documentation is needed...


DEPENDENCIES

This module relies on the following other modules (which may have their own dependencies):

Digest::SHA1
Digest::HMAC_SHA1
Params::Validate
Crypt::OpenSSL::RSA (at least version 0.17)
MIME::Base64
URI::Escape
Carp


AUTHOR

Jon Warbrick (jon.warbrick@ucs.cam.ac.uk)


COPYRIGHT

Copyright (c) 2004,2005 University of Cambridge. You can redistribute it and/or modify it under the terms of the GNU Lesser General Public License.


SEE ALSO

perl(1), 'The Cambridge Web Authentication System: WAA->WLS communication protocol'.