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

NAME

Authen::CAS::External::Response - Response from CAS interaction.

VERSION

This documentation refers to Authen::CAS::External::Response version 0.02

SYNOPSIS

  my $response = $cas_external->authenticate;

  if (!$response->is_success) {
    croak 'Authentication failed';
  }

  # Get a PHP Session cookie
  my %cookies = $response->get_cookies('PHPSESSID');
  my $PHP_SESSION_ID = $cookies{PHPSESSID};

  # Continue the request
  $response = $ua->get($response->destination);

DESCRIPTION

This module is rarely created by anything other than Authen::CAS::External::UserAgent. This is an object that is provided to make determining what the CAS response was easier.

METHODS

get_cookies

This method is for convience pruposes. Using this method, a HEAD request will be made to the destination URL and will return a hash of the cookie names and their values that would have been set.

get_cookies()

When no arguments are provided, returns a string of the cookies, using the as_string method of HTTP::Cookie.

get_cookies(qw(PHPSESSID))

When given a list of cookie names, a hash is returned with only those cookies where the cookie name is the key and the value is the value.

is_success

Returns a Boolean of weither or not this response indicates a successful authentication.

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.