ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Abstract.php
Go to the documentation of this file.
1 <?php
2 
43 {
44 
49  private $_proxyTicket;
50 
61  public function setProxyTicket ($proxyTicket)
62  {
63  if (empty($proxyTicket)) {
65  'Trying to initialize with an empty proxy ticket.'
66  );
67  }
68  if (!empty($this->_proxyTicket)) {
70  'Already initialized, cannot change the proxy ticket.'
71  );
72  }
73  $this->_proxyTicket = $proxyTicket;
74  }
75 
83  protected function getProxyTicket ()
84  {
85  if (empty($this->_proxyTicket)) {
87  'No proxy ticket yet. Call $this->initializeProxyTicket() to aquire the proxy ticket.'
88  );
89  }
90 
91  return $this->_proxyTicket;
92  }
93 
97  private $_casClient;
98 
112  public function setCasClient (CAS_Client $casClient)
113  {
114  if (!empty($this->_proxyTicket)) {
115  throw new CAS_OutOfSequenceException(
116  'Already initialized, cannot change the CAS_Client.'
117  );
118  }
119 
120  $this->_casClient = $casClient;
121  }
122 
133  protected function initializeProxyTicket()
134  {
135  if (!empty($this->_proxyTicket)) {
136  throw new CAS_OutOfSequenceException(
137  'Already initialized, cannot initialize again.'
138  );
139  }
140  // Allow usage of a particular CAS_Client for unit testing.
141  if (empty($this->_casClient)) {
143  } else {
144  $this->_casClient->initializeProxiedService($this);
145  }
146  }
147 
148 }
149 ?>
$_proxyTicket
The proxy ticket that can be used when making service requests.
Definition: Abstract.php:49
setCasClient(CAS_Client $casClient)
Use a particular CAS_Client->initializeProxiedService() rather than the static phpCAS::initializeProx...
Definition: Abstract.php:112
initializeProxyTicket()
Fetch our proxy ticket.
Definition: Abstract.php:133
This class implements common methods for ProxiedService implementations included with phpCAS...
Definition: Abstract.php:41
This interface defines methods that allow proxy-authenticated service handlers to interact with phpCA...
setProxyTicket($proxyTicket)
Register a proxy ticket with the Proxy that it can use when making requests.
Definition: Abstract.php:61
This class defines Exceptions that should be thrown when the sequence of operations is invalid...
Exception that denotes invalid arguments were passed.
static initializeProxiedService(CAS_ProxiedService $proxiedService)
Initialize a proxied-service handler with the proxy-ticket it should use.
Definition: CAS.php:891
getProxyTicket()
Answer the proxy ticket to be used when making requests.
Definition: Abstract.php:83
The CAS_Client class is a client interface that provides CAS authentication to PHP applications...
Definition: Client.php:51