addExtension() public method

$extension_request: An object that implements the extension request interface for adding arguments to an OpenID message.
public addExtension ( $extension_request )
Esempio n. 1
0
 /**
  * Build auth request
  *
  * @return mixed
  */
 function buildRedirect()
 {
     $sreg_request = Auth_OpenID_SRegRequest::build(null, $this->sregFields);
     if ($sreg_request) {
         $this->_auth_request->addExtension($sreg_request);
     }
     $pape_request = new Auth_OpenID_PAPE_Request($this->pape_policy_uris);
     if ($pape_request) {
         $this->_auth_request->addExtension($pape_request);
     }
     $this->_message = $this->_auth_request->getMessage($this->getTrustRoot(), $this->getReturnTo());
     if (Auth_OpenID::isFailure($this->_message)) {
         $this->_error = "Could not redirect to server: " . $this->_message->message;
         return false;
     } else {
         return true;
     }
 }