From cdcaef4259c8fbb68eb9e0116cacdb00502a8113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Thu, 25 Oct 2007 07:15:41 +0000 Subject: [PATCH] Adding a diagnostics web page for hostname handling git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@55 44740490-163a-0410-bde0-09ae8108e29a --- www/example-simple/hostnames.php | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 www/example-simple/hostnames.php diff --git a/www/example-simple/hostnames.php b/www/example-simple/hostnames.php new file mode 100644 index 000000000..cb245a232 --- /dev/null +++ b/www/example-simple/hostnames.php @@ -0,0 +1,47 @@ +<?php + +require_once('../_include.php'); + +require_once('SimpleSAML/Utilities.php'); +require_once('SimpleSAML/Session.php'); +require_once('SimpleSAML/XML/MetaDataStore.php'); +require_once('SimpleSAML/XML/SAML20/AuthnRequest.php'); +require_once('SimpleSAML/XML/SAML20/AuthnResponse.php'); +require_once('SimpleSAML/Bindings/SAML20/HTTPRedirect.php'); +require_once('SimpleSAML/Bindings/SAML20/HTTPPost.php'); +require_once('SimpleSAML/XHTML/Template.php'); + +session_start(); + +/* Load simpleSAMLphp, configuration and metadata */ +$config = SimpleSAML_Configuration::getInstance(); +$metadata = new SimpleSAML_XML_MetaDataStore($config); + + + +$attributes = array(); + +$attributes['selfURLhost'] = array(SimpleSAML_Utilities::selfURLhost()); +$attributes['selfURLNoQuery'] = array(SimpleSAML_Utilities::selfURLNoQuery()); +$attributes['selfURL'] = array(SimpleSAML_Utilities::selfURL()); + +$attributes['HTTP_HOST'] = array($_SERVER['HTTP_HOST']); +$attributes['HTTPS'] = array($_SERVER['HTTPS']); +$attributes['SERVER_PROTOCOL'] = array($_SERVER['SERVER_PROTOCOL']); +$attributes['SERVER_PORT'] = array($_SERVER['SERVER_PORT']); + + + + +$et = new SimpleSAML_XHTML_Template($config, 'status.php'); + +$et->data['header'] = 'SimpleSAMLphp Diagnostics'; +$et->data['remaining'] = 'na'; +$et->data['attributes'] = $attributes; +$et->data['valid'] = 'na'; +$et->data['logout'] = ''; + +$et->show(); + + +?> \ No newline at end of file -- GitLab