Authen...esponse(3pm)
π NAME π
okay bestie, gather round, because this is Authen::CAS::Client::Response β a whole lil set of classes for implementing responses from a CAS server π¦β¨
πΈ DESCRIPTION πΈ
so basically, Authen::CAS::Client::Response implements a base class that's used to build up a whole hierarchy of response objects, and those get returned from methods in Authen::CAS::Client. π
and likeβ¦ most of these response objects? their whole job is to encapsulate one specific type of response from a CAS server. no more, no less. it's giving "I have one task and I ate." π
β¨ CLASSES AND METHODS β¨
π«Ά Authen::CAS::Client::Response
Authen::CAS::Client::Response is the base class, and every other response class inherits from it. so it's very primitive, very "I'm the blueprint bestie," and it is never used directly. periodt. π
new( %args )βnew()creates an instance of anAuthen::CAS::Client::Responseobject and assigns its data members according to the values in%args.is_error()β returns true if the response represents an error object.is_failure()β returns true if the response represents a failure object.is_success()β returns true if the response represents a success object.doc()β returns the response document that was used to create the response object. for errors and CAS v1.0 requests, this is gonna be the raw text response from the server. otherwise you get anXML::LibXMLobject back. lowkey perfect for debugging or for grabbing extra info out of the CAS server's response πβ¨
π Authen::CAS::Client::Response::Error
Authen::CAS::Client::Response::Error is what shows up when an error happens that stops further processing of a request. and bestie, that includes a LOT of scenarios:
- not being able to connect to the CAS server π
- receiving an unexpected response from the server
- not being able to correctly parse the server's response according to the guidelines in the CAS protocol specification π
new( error => $error, doc => $doc )β creates an instance of anAuthen::CAS::Client::Response::Errorobject.$erroris the error string.$docis the response document.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. sad girl hours fr fr π
new( code => $code, message => $message, doc => $doc )β creates an instance of anAuthen::CAS::Client::Response::Failureobject.$codeis the failure code.$messageis the failure message.$docis the response document.code()β returns the failure code.message()β returns the failure message.
π Authen::CAS::Client::Response::AuthFailure
Authen::CAS::Client::Response::AuthFailure is a subclass of Authen::CAS::Client::Response::Failure, and it's used when a validation attempt fails. not the vibe we wanted, but okay. π₯²
here's the tea on how the fields get set, depending on protocol:
- when using the CAS v2.0 protocol:
$code,$messageand$docare set according to what is parsed from the server response. - when using the CAS v1.0 protocol:
$codeis set to'V10_AUTH_FAILURE',$messageis set to the empty string, and$docis set to the server's response content.
No additional methods are defined. that's it, that's the whole class π«Ά
π¦ Authen::CAS::Client::Response::ProxyFailure
Authen::CAS::Client::Response::ProxyFailure is a subclass of Authen::CAS::Client::Response::Failure, and it's used when a cas:proxyFailure response comes back from the CAS server during a proxy attempt. π
$code, $message and $doc are set according to what is parsed from the server response.
No additional methods are defined. iconic minimalism β¨
π Authen::CAS::Client::Response::Success
Authen::CAS::Client::Response::Success is used as a base class for other success responses. these correspond to the cas:authenticationSuccess and cas:proxySuccess server responses. we love a win π
new( doc => $doc )β creates an instance of anAuthen::CAS::Client::Response::Successobject.$docis the response document.
π Authen::CAS::Client::Response::AuthSuccess
Authen::CAS::Client::Response::AuthSuccess is a subclass of Authen::CAS::Client::Response::Success, and it's used when validation succeeds. main character energy, honestly. π
new( user => $user, iou => $iou, proxies => \@proxies, doc => $doc )β creates an instance of anAuthen::CAS::Client::Response::AuthSuccessobject.$useris the username received in the response.$iouis the proxy granting ticket IOU, if present.\@proxiesis the list of proxies used during validation, if present.$docis the response document.user()β returns the user name that was contained in the server response.iou()β returns the proxy granting ticket IOU, if it was present in the server response. otherwise it is set toundef. π«proxies()β returns the list of proxies present in the server response. if no proxies are found, an empty list is returned. and in scalar context, an array reference will be returned instead. context matters, bestie, always π§
β Authen::CAS::Client::Response::ProxySuccess
Authen::CAS::Client::Response::ProxySuccess is a subclass of Authen::CAS::Client::Response::Success, and it's used when a cas:proxySuccess response is received from the CAS server during a proxy attempt. slay π₯
new( proxy_ticket => $proxy_ticket, doc => $doc )β creates an instance of anAuthen::CAS::Client::Response::ProxySuccessobject.$proxy_ticketis the proxy ticket received in the response.$docis the response document.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. bestie, if you find a bug, SAY SOMETHING. don't gatekeep. π
π«Ά AUTHOR π«Ά
jason hord <pravus@cpan.org>
πΈ SEE ALSO πΈ
Authen::CAS::Client
π LICENSE π
This software is information. It is subject only to local laws of physics.
literally the most unhinged and most correct license of all time. no cap. π β¨
and that's the whole page, bestie β this one shipped as part of perl v5.36.0, dated 2022-10-13, so go forth and handle those CAS responses like the icon you are. π¦ππ
π¦ where this page comes from
- ubuntu noble: libauthen-cas-client-perl 0.08-2 Β· MIT
- ubuntu resolute: libauthen-cas-client-perl 0.08-2 Β· MIT
- ubuntu stonking: libauthen-cas-client-perl 0.08-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms