setRelayState() public method

public setRelayState ( $relayState )
コード例 #1
0
 /**
  * Decode a received response.
  *
  * @param array $post POST data received.
  *
  * @return SimpleSAML_XML_Shib13_AuthnResponse The response decoded into an object.
  *
  * @throws Exception If there is no SAMLResponse parameter.
  */
 public function decodeResponse($post)
 {
     assert('is_array($post)');
     if (!array_key_exists('SAMLResponse', $post)) {
         throw new Exception('Missing required SAMLResponse parameter.');
     }
     $rawResponse = $post['SAMLResponse'];
     $samlResponseXML = base64_decode($rawResponse);
     \SimpleSAML\Utils\XML::debugSAMLMessage($samlResponseXML, 'in');
     \SimpleSAML\Utils\XML::checkSAMLMessage($samlResponseXML, 'saml11');
     $samlResponse = new SimpleSAML_XML_Shib13_AuthnResponse();
     $samlResponse->setXML($samlResponseXML);
     if (array_key_exists('TARGET', $post)) {
         $samlResponse->setRelayState($post['TARGET']);
     }
     return $samlResponse;
 }
コード例 #2
0
ファイル: HTTPPost.php プロジェクト: hukumonline/yii
 /**
  * Decode a received response.
  *
  * @param array $post  POST data received.
  * @return SimpleSAML_XML_Shib13_AuthnResponse  Response.
  */
 public function decodeResponse($post)
 {
     assert('is_array($post)');
     if (!array_key_exists('SAMLResponse', $post)) {
         throw new Exception('Missing required SAMLResponse parameter.');
     }
     $rawResponse = $post['SAMLResponse'];
     $samlResponseXML = base64_decode($rawResponse);
     SimpleSAML_Utilities::validateXMLDocument($samlResponseXML, 'saml11');
     $samlResponse = new SimpleSAML_XML_Shib13_AuthnResponse();
     $samlResponse->setXML($samlResponseXML);
     if (array_key_exists('TARGET', $post)) {
         $samlResponse->setRelayState($post['TARGET']);
     }
     return $samlResponse;
 }