1Authen::CAS::Client::ReUsspeornsCeo(n3t)ributed Perl DocAuumtehnetna:t:iCoAnS::Client::Response(3)
2
3
4
6 Authen::CAS::Client::Response - A set of classes for implementing
7 responses from a CAS server
8
10 Authen::CAS::Client::Response implements a base class that is used to
11 build a hierarchy of response objects that are returned from methods in
12 Authen::CAS::Client. Most response objects are meant to encapsulate a
13 type of response from a CAS server.
14
16 Authen::CAS::Client::Response
17 Authen::CAS::Client::Response is the base class from which all other
18 response classes inherit. As such it is very primitive and is never
19 used directly.
20
21 new( %args )
22
23 "new()" creates an instance of an "Authen::CAS::Client::Response"
24 object and assigns its data members according to the values in %args.
25
26 is_error()
27
28 "is_error()" returns true if the response represents an error object.
29
30 is_failure()
31
32 "is_failure()" returns true if the response represents a failure
33 object.
34
35 is_success()
36
37 "is_success()" returns true if the response represents a success
38 object.
39
40 doc()
41
42 "doc()" returns the response document used to create the response
43 object. For errors and CAS v1.0 requests this will be the raw text
44 response from the server. Otherwise an XML::LibXML object will be
45 returned. This can be used for debugging or retrieving additional
46 information from the CAS server's response.
47
48 Authen::CAS::Client::Response::Error
49 Authen::CAS::Client::Response::Error is used when an error occurs that
50 prevents further processing of a request. This would include not being
51 able connect to the CAS server, receiving an unexpected response from
52 the server or being unable to correctly parse the server's response
53 according to the guidelines in the CAS protocol specification.
54
55 new( error => $error, doc => $doc )
56
57 "new()" creates an instance of an
58 "Authen::CAS::Client::Response::Error" object. $error is the error
59 string. $doc is the response document.
60
61 error()
62
63 "error()" returns the error string.
64
65 Authen::CAS::Client::Response::Failure
66 Authen::CAS::Client::Response::Failure is used as a base class for
67 other failure responses. These correspond to the
68 "cas:authenticationFailure" and "cas:proxyFailure" server responses
69 outlined in the CAS protocol specification.
70
71 new( code => $code, message => $message, doc => $doc )
72
73 "new()" creates an instance of an
74 "Authen::CAS::Client::Response::Failure" object. $code is the failure
75 code. $message is the failure message. $doc is the response document.
76
77 code()
78
79 "code()" returns the failure code.
80
81 message()
82
83 "message()" returns the failure message.
84
85 Authen::CAS::Client::Response::AuthFailure
86 Authen::CAS::Client::Response::AuthFailure is a subclass of
87 "Authen::CAS::Client::Response::Failure" and is used when a validation
88 attempt fails. When using the CAS v2.0 protocol, $code, $message and
89 $doc are set according to what is parsed from the server response.
90 When using the CAS v1.0 protocol, $code is set to 'V10_AUTH_FAILURE',
91 $message is set to the empty string and $doc is set to the server's
92 response content.
93
94 No additional methods are defined.
95
96 Authen::CAS::Client::Response::ProxyFailure
97 Authen::CAS::Client::Response::ProxyFailure is a subclass of
98 "Authen::CAS::Client::Response::Failure" and is used when a
99 "cas:proxyFailure" response is received from the CAS server during a
100 proxy attempt. $code, $message and $doc are set according to what is
101 parsed from the server response.
102
103 No additional methods are defined.
104
105 Authen::CAS::Client::Response::Success
106 "Authen::CAS::Client::Response::Success" is used as base class for
107 other success responses. These correspond to the
108 "cas:authenticationSuccess" and "cas:proxySuccess" server responses.
109
110 new( doc => $doc )
111
112 "new()" creates an instance of an
113 "Authen::CAS::Client::Response::Success" object. $doc is the response
114 document.
115
116 Authen::CAS::Client::Response::AuthSuccess
117 Authen::CAS::Client::Response::AuthSuccess is a subclass of
118 "Authen::CAS::Client::Response::Success" and is used when validation
119 succeeds.
120
121 new( user => $user, iou => $iou, proxies => \@proxies, doc => $doc )
122
123 "new()" creates an instance of an
124 "Authen::CAS::Client::Response::AuthSuccess" object. $user is the
125 username received in the response. $iou is the proxy granting ticket
126 IOU, if present. "\@proxies" is the list of proxies used during
127 validation, if present. $doc is the response document.
128
129 user()
130
131 "user()" returns the user name that was contained in the server
132 response.
133
134 iou()
135
136 "iou()" returns the proxy granting ticket IOU, if it was present in the
137 server response. Otherwise it is set to "undef".
138
139 proxies()
140
141 "proxies()" returns the list of proxies present in the server response.
142 If no proxies are found, an empty list is returned. In scalar context
143 an array reference will be returned instead.
144
145 Authen::CAS::Client::Response::ProxySuccess
146 Authen::CAS::Client::Response::ProxySuccess is a subclass of
147 "Authen::CAS::Client::Response::Success" and is used when a
148 "cas:proxySuccess" response is received from the CAS server during a
149 proxy attempt.
150
151 new( proxy_ticket => $proxy_ticket, doc => $doc )
152
153 "new()" creates an instance of an
154 "Authen::CAS::Client::Response::ProxySuccess" object. $proxy_ticket is
155 the proxy ticket received in the response. $doc is the response
156 document.
157
158 proxy_ticket()
159
160 "proxy_ticket()" returns the proxy ticket that was contained in the
161 server response.
162
164 None are known at this time, but if you find one, please feel free to
165 submit a report to the author.
166
168 jason hord <pravus@cpan.org>
169
171 Authen::CAS::Client
172
174 Copyright (c) 2007-2014, jason hord
175
176 Permission is hereby granted, free of charge, to any person obtaining a
177 copy of this software and associated documentation files (the
178 "Software"), to deal in the Software without restriction, including
179 without limitation the rights to use, copy, modify, merge, publish,
180 distribute, sublicense, and/or sell copies of the Software, and to
181 permit persons to whom the Software is furnished to do so, subject to
182 the following conditions:
183
184 The above copyright notice and this permission notice shall be included
185 in all copies or substantial portions of the Software.
186
187 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
188 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
189 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
190 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
191 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
192 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
193 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
194
195
196
197perl v5.28.1 2014-01-10 Authen::CAS::Client::Response(3)