NAME
Solstice::Model::FileTicket - An interface for fetching one time use tickets for files.
SYNOPSIS
# Create a new ticket for a file
my $ticket = Solstice::Model::FileTicket->new({ file => $file });
# Get a nice, encrypted id
my $key = $ticket->getKey();
# Create a ticket based on a key
# If it's not valid, $ticket will be undefined.
my $ticket = Solstice::Model::FileTicket->new({ key => $key });
# Get the file id back out of the ticket.
# Should we add a getFile() method?
my $file_id = $ticket->getFileID();
# Expire the ticket
$ticket->expire();
Export
None by default.
Methods
Private Methods
- _initByKey($key)
-
Loads the ticket for the given key.
- _initByFile($file)
-
Creates and stores a new ticket for the given file. The file must be stored.
- _getAccessorDefinition()
AUTHOR
Catalyst Research & Development Group, <catalyst@u.washington.edu>
VERSION
$Revision: $
SEE ALSO
COPYRIGHT
Copyright 1998-2007 Office of Learning Technologies, University of Washington
Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.