From 38f70eddff2fa578d0aaac132cc90580796d28fb Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Fri, 3 Jul 2009 13:21:37 +0000 Subject: [PATCH] HTTPPost: Use new post redirect function. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1547 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Bindings/SAML20/HTTPPost.php | 14 ++++---------- lib/SimpleSAML/Bindings/Shib13/HTTPPost.php | 10 ++++------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php index 703f08f0a..4c934ae2f 100644 --- a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php @@ -192,16 +192,10 @@ class SimpleSAML_Bindings_SAML20_HTTPPost { } else { - $p = new SimpleSAML_XHTML_Template($this->configuration, 'post.php'); - - $p->data['RelayStateName'] = 'RelayState'; - $p->data['RelayState'] = $relayState; - $p->data['destination'] = $destination; - $p->data['response'] = base64_encode($response); - - $p->show(); - - + SimpleSAML_Utilities::postRedirect($destination, array( + 'RelayState' => $relayState, + 'SAMLResponse' => base64_encode($response), + )); } diff --git a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php index 8b6a14e26..68a0051eb 100644 --- a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php @@ -94,12 +94,10 @@ class SimpleSAML_Bindings_Shib13_HTTPPost { $p->show(); } else { - $p = new SimpleSAML_XHTML_Template($this->configuration, 'post.php'); - $p->data['RelayStateName'] = 'TARGET'; - $p->data['RelayState'] = $relayState; - $p->data['destination'] = $shire; - $p->data['response'] = base64_encode($response); - $p->show(); + SimpleSAML_Utilities::postRedirect($destination, array( + 'TARGET' => $relayState, + 'SAMLResponse' => base64_encode($response), + )); } } -- GitLab