ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Abstract.php
Go to the documentation of this file.
1<?php
2
43{
44
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
92 }
93
97 private $_casClient;
98
112 public function setCasClient (CAS_Client $casClient)
113 {
114 if (!empty($this->_proxyTicket)) {
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)) {
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?>
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:43
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
setProxyTicket($proxyTicket)
Register a proxy ticket with the Proxy that it can use when making requests.
Definition: Abstract.php:61
$_proxyTicket
The proxy ticket that can be used when making service requests.
Definition: Abstract.php:49
getProxyTicket()
Answer the proxy ticket to be used when making requests.
Definition: Abstract.php:83
static initializeProxiedService(CAS_ProxiedService $proxiedService)
Initialize a proxied-service handler with the proxy-ticket it should use.
Definition: CAS.php:891
This interface defines methods that allow proxy-authenticated service handlers to interact with phpCA...