setNoClearTicketsFromUrl() public method

Needed for testing authentication
public setNoClearTicketsFromUrl ( ) : void
return void
示例#1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     $_SERVER['SERVER_NAME'] = 'www.service.com';
     $_SERVER['SERVER_PORT'] = '80';
     $_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
     $_SERVER['SERVER_ADMIN'] = 'root@localhost';
     $_SERVER['REQUEST_URI'] = '/';
     $_SERVER['SCRIPT_NAME'] = '/index.php';
     $_SERVER['PHP_SELF'] = '/index.php';
     $_SESSION = array();
     $this->object = new CAS_Client(CAS_VERSION_2_0, false, 'cas.example.edu', 443, '/cas/', false);
     $this->object->setRequestImplementation('CAS_TestHarness_DummyRequest');
     $this->object->setCasServerCACert('/path/to/ca_cert.crt');
     $this->object->setNoClearTicketsFromUrl();
     // 		phpCAS::setDebug(dirname(__FILE__).'/../test.log');
 }
示例#2
0
文件: CAS.php 项目: DCUnit711/Demeter
 /**
  * Disable the removal of a CAS-Ticket from the URL when authenticating
  * DISABLING POSES A SECURITY RISK:
  * We normally remove the ticket by an additional redirect as a security
  * precaution to prevent a ticket in the HTTP_REFERRER or be carried over in
  * the URL parameter
  *
  * @return void
  */
 public static function setNoClearTicketsFromUrl()
 {
     phpCAS::traceBegin();
     phpCAS::_validateClientExists();
     self::$_PHPCAS_CLIENT->setNoClearTicketsFromUrl();
     phpCAS::traceEnd();
 }