NAME

HTTP::DAV::Xythos - Subclass of HTTP::DAV which adds support for Xythos Ticket authentication.

VERSION

version 1.101180

SYNOPSIS

use HTTP::DAV::Xythos;

my $d = HTTP::DAV::Xythos->new (
    ticket  => "https://xythos.wisc.edu/xythoswfs/webui/_xy-32583927_2-y_4hFtiGEt",
    pass    => "foobar",  
);

# $d->{webdav_url} contains the full URL to the WebDAV location where the
# Ticket is rooted (e.g. https://xythos.wisc.edu/buckybadger/ftw/images)
my $location = $d->{webdav_url};

# Use L<HTTP::DAV> as you would normally 
# (you do not need to authenticate with a user/pass)

# Example - recursively download files
my $d = HTTP::DAV::Xythos->new (
    ticket => $ticket,
    pass   => $pass,
);
get($d, $d->{webdav_url}, '/tmp');
sub get {
    my ($d, $url, $dir) = @_;
    $d->open( -url => $url );
    my $r = $d->propfind( -url=>$url, -depth=>1);
    if ( $r->is_collection ) {
        $url =~ s/(.*[^\/])$/$1\//;
        $dir =~ s/(.*[^\/])$/$1\//;
        mkdir $dir unless ( -d $dir );
        my $rl = $r->get_resourcelist;
        for ( $rl->get_resources ) {
            my $rel_uri = $_->get_property('rel_uri');
            get($d, $url.$rel_uri, $dir.$rel_uri);
        }
    }
    else {
        $d->get( -url=>$url, -to=>$dir);
        print "$url ---> $dir\n";
    }
}

DESCRIPTION

Xythos is an enterprise web-based document management server that supports WebDAV.

Tickets are a feature of Xythos that allow users to share content with only a URL and an optional password. You cannot authenticate directly to Xythos' WebDAV locations using a Ticket - you must first login using the web interface.

HTTP::DAV::Xythos implements the login process so that you can effectively login to a Xythos WebDAV server using a Ticket for authentication.

Once you create the HTTP::DAV::Xythos object, passing in the ticket (and optional pass) to the contructor, you are successfully authenticated to the WebDAV server and can proceed to interact with the server using all of the functionality that is built into HTTP::DAV.

HTTP::DAV::Xythos adds session cookie functionality to the LWP user agent, since cookies are required for maintaining authorized (Ticket) access to the Xythos WebDAV server.

SUPPORT

This module is not an official Xythos service.

AUTHOR

Jesse Thompson
CPAN ID: MODAUTHOR
Division of Information Technology, University of Wisconsin-Madison
jesse.thompson@doit.wisc.edu
http://www.doit.wisc.edu

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

http://xythos.com

HTTP::DAV