The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Authen::CAS::External::UserAgent - UserAgent role for CAS session managers.

VERSION

This documentation refers to <Authen::CAS::External::UserAgent> version 0.01

SYNOPSIS

  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;

DESCRIPTION

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.

ROLE REQUIRES

This is a Moose::Role and for this role to be used, the user MUST provide the following two methods:

get_cas_credentials

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.

METHODS

service_request_url

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.

DEPENDENCIES

AUTHOR

Douglas Christopher Wilson, <doug at somethingdoug.com>

BUGS AND LIMITATIONS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Authen::CAS::External

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

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.