WebService::Cmis::Agent::CookieAuth - cookie-based authentication handler
This user agent allows to remain logged in based on cookie information returned by the server.
my $client = WebService::Cmis::getClient( url => "http://localhost:8080/nuxeo/atom/cmis", useragent => new WebService::Cmis::Agent::CookieAuth( user => "user", password => "password", loginUrl => "http://localhost:8080/nuxeo/nxstartup.faces", cookieDir => "/tmp", ) ); my $cookie = $client->login; my $repo = $client->getRepository;
Parent class: WebService::Cmis::Agent
Create a new WebService::Cmis::Agent::CookieAuth.
Parameters:
user
password
loginUrl (defaults to the cmis client's atom endpoint)
cookieDir (defaults to /tmp)
See LWP::UserAgent for more options.
logs in to the web service
cookie
Login using basic auth or based on a cookie previously collected.
my $cookie = $client->login({ user => "user", password => "pasword" }); $client->login({ cookie => $cookie });
logs out of the web service deleting a cookie previously aquired
overrides the method in LWP::UserAgent to implement the given authentication mechanism.
Copyright 2012-2013 Michael Daum
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/artistic.html.
To install WebService::Cmis, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Cmis
CPAN shell
perl -MCPAN -e shell install WebService::Cmis
For more information on module installation, please visit the detailed CPAN module installation guide.