NAME
Authen::CAS::Client::Response - A set of classes for implementing responses from a CAS server
DESCRIPTION
Authen::CAS::Client::Response
implements a base class that is used to build a hierarchy of response objects that are returned from methods in Authen::CAS::Client. Most response objects are meant to encapsulate a type of response from a CAS server.
CLASSES AND METHODS
Authen::CAS::Client::Response
Authen::CAS::Client::Response
is the base class from which all other response classes inherit. As such it is very primitive and is never used directly.
- new %ARGS
-
new() creates an instance of an
Authen::CAS::Client::Response
object and assigns its data members according to the values in%ARGS
. - is_error
-
is_error() returns true if the response represents an error object.
- is_failure
-
is_failure() returns true if the response represents a failure object.
- is_success
-
is_success() returns true if the response represents a success object.
Authen::CAS::Client::Response::Error
Authen::CAS::Client::Response::Error
is used when an error occurs that prevents further processing of a request. This would include not being able connect to the CAS server, receiving an unexpected response from the server or being unable to correctly parse the server's response according to the guidelines in the CAS protocol specification.
- new $ERROR
-
new() creates an instance of an
Authen::CAS::Client::Response::Error
object.$ERROR
is the error string. - error
-
error() returns the error string.
Authen::CAS::Client::Response::Failure
Authen::CAS::Client::Response::Failure
is used as a base class for other failure responses. These correspond to the cas:authenticationFailure
and cas:proxyFailure
server responses outlined in the CAS protocol specification.
- new $CODE, $MESSAGE
-
new() creates an instance of an
Authen::CAS::Client::Response::Failure
object.$CODE
is the failure code.$MESSAGE
is the failure message. - code
-
code() returns the failure code.
- message
-
message() returns the failure message.
Authen::CAS::Client::Response::AuthFailure
Authen::CAS::Client::Response::AuthFailure
is used when a cas:authenticationFailure
response is received from the CAS server during a validation attempt. When using the CAS v2.0 protocol, $CODE
and $MESSAGE
are set according to what is parsed from the server response. When using the CAS v1.0 protocol, $CODE
is set to 'V10_AUTH_FAILURE' and $MESSAGE
is set to the empty string.
No additional methods are defined.
Authen::CAS::Client::Response::ProxyFailure
Authen::CAS::Client::Response::ProxyFailure
is used when a <cas:proxyFailure> response is received from the CAS server during a proxy attempt. $CODE
and $MESSAGE
are set according to what is parsed from the server response.
Authen::CAS::Client::Response::Success
Authen::CAS::Client::Response::Success
is used as base class for other success responses. These correspond to the cas:authenticationSuccess
and cas:proxySuccess
server responses.
No additional methods are defined.
Authen::CAS::Client::Response::AuthSuccess
Authen::CAS::Client::Response::AuthSuccess
is used when a cas:authenticationSuccess
response is received from the CAS server during a validation attempt.
- user
-
user() returns the user name that was contained in the server response.
- iou
-
iou() returns the proxy granting ticket IOU, if it was present in the server response. Otherwise it is set to
undef
. - proxies
-
proxies() returns the list of proxies present in the server response. If no proxies are found, an empty list is returned. In scalar context an array reference will be returned instead.
Authen::CAS::Client::Response::ProxySuccess
Authen::CAS::Client::Response::ProxySuccess
is used when a cas:proxySuccess
response is received from the CAS server during a proxy attempt.
- proxy_ticket
-
proxy_ticket() returns the proxy ticket that was contained in the server response.
BUGS
None are known at this time, but if you find one, please feel free to submit a report to the author.
AUTHOR
jason hord <pravus@cpan.org>
SEE ALSO
COPYRIGHT
Copyright (c) 2007-2009, jason hord
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.