Initialize a proxied-service handler with the proxy-ticket it should use.
public initializeProxiedService ( CAS_ProxiedService $proxiedService ) : void | ||
$proxiedService | CAS_ProxiedService | service handler |
return | void |
/** * Fetch our proxy ticket. * * Descendent classes should call this method once their service URL is available * to initialize their proxy ticket. * * @return void * @throws CAS_OutOfSequenceException If called after a proxy ticket has * already been initialized. */ protected function initializeProxyTicket() { if (!empty($this->_proxyTicket)) { throw new CAS_OutOfSequenceException('Already initialized, cannot initialize again.'); } // Allow usage of a particular CAS_Client for unit testing. if (empty($this->_casClient)) { phpCAS::initializeProxiedService($this); } else { $this->_casClient->initializeProxiedService($this); } }
/** * Initialize a proxied-service handler with the proxy-ticket it should use. * * @param CAS_ProxiedService $proxiedService Proxied Service Handler * * @return void * @throws CAS_ProxyTicketException If there is a proxy-ticket failure. * The code of the Exception will be one of: * PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE * PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE * PHPCAS_SERVICE_PT_FAILURE */ public static function initializeProxiedService(CAS_ProxiedService $proxiedService) { phpCAS::_validateProxyExists(); try { self::$_PHPCAS_CLIENT->initializeProxiedService($proxiedService); } catch (Exception $e) { phpCAS::error(get_class($e) . ': ' . $e->getMessage()); } }