NAME
WebService::Cmis::Agent::CookieAuth - cookie-based authentication handler
DESCRIPTION
This user agent allows to remain logged in based on cookie information returned by the server.
my
$client
= WebService::Cmis::getClient(
useragent
=> new WebService::Cmis::Agent::CookieAuth(
user
=>
"user"
,
password
=>
"password"
,
cookieDir
=>
"/tmp"
,
)
);
my
$cookie
=
$client
->login;
my
$repo
=
$client
->getRepository;
Parent class: WebService::Cmis::Agent
METHODS
- new(%params)
-
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
Parameters:
user
password
cookie
Login using basic auth or based on a cookie previously collected.
my
$cookie
=
$client
->login({
user
=>
"user"
,
password
=>
"pasword"
});
$client
->login({
cookie
=>
$cookie
});
- logout()
-
logs out of the web service deleting a cookie previously aquired
- get_basic_credentials()
-
overrides the method in LWP::UserAgent to implement the given authentication mechanism.
COPYRIGHT AND LICENSE
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.