retrievePT() public method

This method is used to retrieve PT's from the CAS server thanks to a PGT.
public retrievePT ( string $target_service, &$err_code, &$err_msg ) : a
$target_service string the service to ask for with the PT.
return a Proxy Ticket, or false on error.
コード例 #1
0
ファイル: ServiceWebTest.php プロジェクト: dwoodard/phpcas
 /**
  * Test that we can at least retrieve a proxy-ticket for the service.
  *
  * @return void
  */
 public function testRetrievePT()
 {
     $pt = $this->object->retrievePT('http://www.service.com/my_webservice', $err_code, $err_msg);
     $this->assertEquals('PT-asdfas-dfasgww2323radf3', $pt);
 }
コード例 #2
0
ファイル: ServiceMailTest.php プロジェクト: tillk/vufind
 /**
  * Test that we can at least retrieve a proxy-ticket for the service.
  *
  * @return void
  */
 public function testRetrievePT()
 {
     $pt = $this->object->retrievePT('imap://mail.example.edu/path/to/something', $err_code, $err_msg);
     $this->assertEquals('PT-asdfas-dfasgww2323radf3', $pt);
 }
コード例 #3
0
ファイル: CAS.php プロジェクト: DCUnit711/Demeter
 /**
  * Retrieve a Proxy Ticket from the CAS server.
  *
  * @param string $target_service Url string of service to proxy
  * @param string &$err_code      error code
  * @param string &$err_msg       error message
  *
  * @return string Proxy Ticket
  */
 public static function retrievePT($target_service, &$err_code, &$err_msg)
 {
     phpCAS::_validateProxyExists();
     try {
         return self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg);
     } catch (Exception $e) {
         phpCAS::error(get_class($e) . ': ' . $e->getMessage());
     }
 }