示例#1
0
 /**
  * Tests that getting and setting the URIs variable works properly
  *
  * @return void
  */
 public function testGetSetURIs()
 {
     $testURIs = array('http://example.com', 'http://myopenid.com');
     $uris = $this->object->getURIs();
     $this->assertEquals(array(), $uris);
     $this->object->setURIs($testURIs);
     $uris = $this->object->getURIs();
     $this->assertEquals($testURIs, $uris);
 }
示例#2
0
文件: Request.php 项目: shupp/openid
 /**
  * Adds a nonce to the openid.return_to URL parameter.  Only used in OpenID 1.1
  * 
  * @return void
  */
 protected function addNonce()
 {
     $nonce = $this->getNonce()->createNonceAndStore();
     $returnToURL = new Net_URL2($this->message->get('openid.return_to'));
     $returnToURL->setQueryVariable(OpenID_Nonce::RETURN_TO_NONCE, urlencode($nonce));
     $this->message->set('openid.return_to', $returnToURL->getURL());
     // Observing
     $logMessage = "Nonce: {$nonce}\n";
     $logMessage = 'New ReturnTo: ' . $returnToURL->getURL() . "\n";
     $logMessage .= 'OP URIs: ' . print_r($this->serviceEndpoint->getURIs(), true);
     OpenID::setLastEvent(__METHOD__, $logMessage);
 }