private static function getSecurePOSTRedirectURL($destination, $data) { $session = \SimpleSAML_Session::getSessionFromRequest(); $id = self::savePOSTData($session, $destination, $data); // encrypt the session ID and the random ID $info = base64_encode(Crypto::aesEncrypt($session->getSessionId() . ':' . $id)); $url = Module::getModuleURL('core/postredirect.php', array('RedirInfo' => $info)); return preg_replace('#^https:#', 'http:', $url); }