Authen::CAS::External::UserAgent - UserAgent role for CAS session managers.
This documentation refers to <Authen::CAS::External::UserAgent> version 0.01
package MyCAS::Session; use Moose; # Use this role with 'Authen::CAS::External::UserAgent'; sub get_cas_credentials { my ($self, $service) = @_; # Do something return $username, $password; } sub get_cas_ticket_granting_cookie { my ($self, $username, $service) = @_; # Do something return $TGC; } 1;
Provides a way to authenticate with a CAS server just as a browser would. This is useful with web scrapers needing to login to a CAS site.
This is a Moose::Role and for this role to be used, the user MUST provide the following two methods:
This is called as a method with the first argument being a string that is the URL of the service that is about to be logged in to. If no service is being logged in to, then it will be undefined. This function is expected to return a username string and a password string, both of which are optional, but MUST be returned in that order.
This is called as a method with the first argument being a string that is the username being used and the second argument being a string that is the URL of the service that is about to be logged into. This function is expected to return a string that is the ticket granting cookie for the CAS service, or nothing.
service_request_url(%args)
This method will return a URI object that is the URL to request for the CAS login page. All arguments are optional. The following are the possible arguments:
service
This is a string of the service URL to log in to.
gateway
This is a Boolean of weither or not to use gateway login mode.
renew
This is a Boolean to weither ot not to renew the session.
HTML::Form 5.817
HTTP::Status 5.817
LWP::UserAgent 5.819
Moose::Role 0.77
MooseX::Types::Moose
Scalar::Util 1.14
URI 1.22
Douglas Christopher Wilson, <doug at somethingdoug.com>
<doug at somethingdoug.com>
Please report any bugs or feature requests to bug-authen-cas-external at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Authen-CAS-External. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-authen-cas-external at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Authen::CAS::External
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Authen-CAS-External
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Authen-CAS-External
CPAN Ratings
http://cpanratings.perl.org/d/Authen-CAS-External
Search CPAN
http://search.cpan.org/dist/Authen-CAS-External/
Copyright 2009 Douglas Christopher Wilson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Authen::CAS::External, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Authen::CAS::External
CPAN shell
perl -MCPAN -e shell install Authen::CAS::External
For more information on module installation, please visit the detailed CPAN module installation guide.