Ejemplo n.º 1
0
 /**
  * Do a request with the current binding
  */
 public function request($requestType = 'AuthnRequest')
 {
     parent::request($requestType);
     $this->setProtocolBinding(self::BINDING_REDIRECT);
     $targetUrl = (string) $this->buildRequestUrl() . '&SAMLRequest=' . $this->buildRequest($requestType);
     header('Location: ' . $targetUrl);
 }
Ejemplo n.º 2
0
 /**
  * Do a request with the current binding
  */
 public function request($requestType = 'AuthnRequest')
 {
     parent::request();
     $this->setProtocolBinding(self::BINDING_POST);
     echo '<html><head></head><body onload="document.postform.submit();">';
     $form = $this->buildPostForm($requestType);
     echo $form;
     echo '</body></html>';
     exit;
 }
Ejemplo n.º 3
0
 /**
  * Do a request with the current binding
  */
 public function request($requestType = 'AuthnRequest', $relayState = '')
 {
     parent::request($requestType);
     $this->setProtocolBinding(self::BINDING_REDIRECT);
     if ($requestType == 'LogoutResponse') {
         $targetUrl = (string) $this->buildRequestUrl() . '&SAMLResponse=' . $this->buildRequest($requestType);
     } else {
         $targetUrl = (string) $this->buildRequestUrl() . '&SAMLRequest=' . $this->buildRequest($requestType);
     }
     if ($relayState != '') {
         $targetUrl .= '&RelayState=' . $relayState;
     }
     header('Location: ' . $targetUrl);
     // Prevent any new headers overriding this one
     exit;
 }