ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Abstract.php
Go to the documentation of this file.
1<?php
2
42{
43
49
60 public function setProxyTicket($proxyTicket)
61 {
62 if (empty($proxyTicket)) {
64 'Trying to initialize with an empty proxy ticket.'
65 );
66 }
67 if (!empty($this->_proxyTicket)) {
69 'Already initialized, cannot change the proxy ticket.'
70 );
71 }
72 $this->_proxyTicket = $proxyTicket;
73 }
74
82 protected function getProxyTicket()
83 {
84 if (empty($this->_proxyTicket)) {
86 'No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.'
87 );
88 }
89
91 }
92
96 private $_casClient;
97
111 public function setCasClient(CAS_Client $casClient)
112 {
113 if (!empty($this->_proxyTicket)) {
115 'Already initialized, cannot change the CAS_Client.'
116 );
117 }
118
119 $this->_casClient = $casClient;
120 }
121
132 protected function initializeProxyTicket()
133 {
134 if (!empty($this->_proxyTicket)) {
136 'Already initialized, cannot initialize again.'
137 );
138 }
139 // Allow usage of a particular CAS_Client for unit testing.
140 if (empty($this->_casClient)) {
142 } else {
143 $this->_casClient->initializeProxiedService($this);
144 }
145 }
146}
The CAS_Client class is a client interface that provides CAS authentication to PHP applications.
Definition: Client.php:52
An exception for terminatinating execution or to throw for unit testing.
Exception that denotes invalid arguments were passed.
This class defines Exceptions that should be thrown when the sequence of operations is invalid.
This class implements common methods for ProxiedService implementations included with phpCAS.
Definition: Abstract.php:42
setCasClient(CAS_Client $casClient)
Use a particular CAS_Client->initializeProxiedService() rather than the static phpCAS::initializeProx...
Definition: Abstract.php:111
initializeProxyTicket()
Fetch our proxy ticket.
Definition: Abstract.php:132
setProxyTicket($proxyTicket)
Register a proxy ticket with the Proxy that it can use when making requests.
Definition: Abstract.php:60
$_proxyTicket
The proxy ticket that can be used when making service requests.
Definition: Abstract.php:48
getProxyTicket()
Answer the proxy ticket to be used when making requests.
Definition: Abstract.php:82
static initializeProxiedService(CAS_ProxiedService $proxiedService)
Initialize a proxied-service handler with the proxy-ticket it should use.
Definition: CAS.php:915
This interface defines methods that allow proxy-authenticated service handlers to interact with phpCA...