Skip to content
Snippets Groups Projects
Commit a5f8c04c authored by Tim van Dijen's avatar Tim van Dijen
Browse files
parent 98ae3780
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ try { ...@@ -22,7 +22,7 @@ try {
$session = \SimpleSAML\Session::getSessionFromRequest(); $session = \SimpleSAML\Session::getSessionFromRequest();
$data = $session->getData('core:errorreport', $reportId); $data = $session->getData('core:errorreport', $reportId);
} catch (\Exception $e) { } catch (\Exception $e) {
\SimpleSAML\Logger::error('Error loading error report data: '.var_export($e->getMessage(), true)); \SimpleSAML\Logger::error('Error loading error report data: ' . var_export($e->getMessage(), true));
} }
if ($data === null) { if ($data === null) {
...@@ -45,12 +45,12 @@ $data['hostname'] = php_uname('n'); ...@@ -45,12 +45,12 @@ $data['hostname'] = php_uname('n');
$data['directory'] = dirname(dirname(__FILE__)); $data['directory'] = dirname(dirname(__FILE__));
if ($config->getBoolean('errorreporting', true)) { if ($config->getBoolean('errorreporting', true)) {
$mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from '.$email); $mail = new SimpleSAML\Utils\EMail('SimpleSAMLphp error report from ' . $email);
$mail->setData($data); $mail->setData($data);
$mail->addReplyTo($email); $mail->addReplyTo($email);
$mail->setText($text); $mail->setText($text);
$mail->send(); $mail->send();
SimpleSAML\Logger::error('Report with id '.$reportId.' sent'); SimpleSAML\Logger::error('Report with id ' . $reportId . ' sent');
} }
// redirect the user back to this page to clear the POST request // redirect the user back to this page to clear the POST request
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* This web page receives requests for web-pages hosted by modules, and directs them to * This web page receives requests for web-pages hosted by modules, and directs them to
* the process() handler in the Module class. * the process() handler in the Module class.
*/ */
require_once('_include.php'); require_once('_include.php');
\SimpleSAML\Module::process()->send(); \SimpleSAML\Module::process()->send();
...@@ -15,7 +15,7 @@ require_once('../../_include.php'); ...@@ -15,7 +15,7 @@ require_once('../../_include.php');
$metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = \SimpleSAML\IdP::getById('saml2:'.$idpEntityId); $idp = \SimpleSAML\IdP::getById('saml2:' . $idpEntityId);
try { try {
\SimpleSAML\Module\saml\IdP\SAML2::receiveAuthnRequest($idp); \SimpleSAML\Module\saml\IdP\SAML2::receiveAuthnRequest($idp);
......
...@@ -14,7 +14,7 @@ require_once('../../_include.php'); ...@@ -14,7 +14,7 @@ require_once('../../_include.php');
$metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = \SimpleSAML\IdP::getById('saml2:'.$idpEntityId); $idp = \SimpleSAML\IdP::getById('saml2:' . $idpEntityId);
if (isset($_REQUEST['ReturnTo'])) { if (isset($_REQUEST['ReturnTo'])) {
$idp->doLogoutRedirect(\SimpleSAML\Utils\HTTP::checkURLAllowed((string) $_REQUEST['ReturnTo'])); $idp->doLogoutRedirect(\SimpleSAML\Utils\HTTP::checkURLAllowed((string) $_REQUEST['ReturnTo']));
......
...@@ -4,7 +4,7 @@ require_once('../../_include.php'); ...@@ -4,7 +4,7 @@ require_once('../../_include.php');
$metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler(); $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
$idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); $idpEntityId = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
$idp = \SimpleSAML\IdP::getById('saml2:'.$idpEntityId); $idp = \SimpleSAML\IdP::getById('saml2:' . $idpEntityId);
\SimpleSAML\Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout'); \SimpleSAML\Logger::info('SAML2.0 - IdP.initSLO: Accessing SAML 2.0 IdP endpoint init Single Logout');
......
...@@ -112,7 +112,7 @@ try { ...@@ -112,7 +112,7 @@ try {
// Artifact sending enabled // Artifact sending enabled
$metaArray['ArtifactResolutionService'][] = [ $metaArray['ArtifactResolutionService'][] = [
'index' => 0, 'index' => 0,
'Location' => HTTP::getBaseURL().'saml2/idp/ArtifactResolutionService.php', 'Location' => HTTP::getBaseURL() . 'saml2/idp/ArtifactResolutionService.php',
'Binding' => Constants::BINDING_SOAP, 'Binding' => Constants::BINDING_SOAP,
]; ];
} }
...@@ -122,7 +122,7 @@ try { ...@@ -122,7 +122,7 @@ try {
array_unshift($metaArray['SingleSignOnService'], [ array_unshift($metaArray['SingleSignOnService'], [
'hoksso:ProtocolBinding' => Constants::BINDING_HTTP_REDIRECT, 'hoksso:ProtocolBinding' => Constants::BINDING_HTTP_REDIRECT,
'Binding' => Constants::BINDING_HOK_SSO, 'Binding' => Constants::BINDING_HOK_SSO,
'Location' => HTTP::getBaseURL().'saml2/idp/SSOService.php' 'Location' => HTTP::getBaseURL() . 'saml2/idp/SSOService.php'
]); ]);
} }
...@@ -130,7 +130,7 @@ try { ...@@ -130,7 +130,7 @@ try {
$metaArray['SingleSignOnService'][] = [ $metaArray['SingleSignOnService'][] = [
'index' => 0, 'index' => 0,
'Binding' => Constants::BINDING_SOAP, 'Binding' => Constants::BINDING_SOAP,
'Location' => HTTP::getBaseURL().'saml2/idp/SSOService.php', 'Location' => HTTP::getBaseURL() . 'saml2/idp/SSOService.php',
]; ];
} }
...@@ -206,7 +206,7 @@ try { ...@@ -206,7 +206,7 @@ try {
$metaxml = $metaBuilder->getEntityDescriptorText(); $metaxml = $metaBuilder->getEntityDescriptorText();
$metaflat = '$metadata['.var_export($idpentityid, true).'] = '.var_export($metaArray, true).';'; $metaflat = '$metadata[' . var_export($idpentityid, true) . '] = ' . var_export($metaArray, true) . ';';
// sign the metadata if enabled // sign the metadata if enabled
$metaxml = \SimpleSAML\Metadata\Signer::sign($metaxml, $idpmeta->toArray(), 'SAML 2 IdP'); $metaxml = \SimpleSAML\Metadata\Signer::sign($metaxml, $idpmeta->toArray(), 'SAML 2 IdP');
...@@ -219,7 +219,7 @@ try { ...@@ -219,7 +219,7 @@ try {
$certdata = []; $certdata = [];
foreach (array_keys($availableCerts) as $availableCert) { foreach (array_keys($availableCerts) as $availableCert) {
$certdata[$availableCert]['name'] = $availableCert; $certdata[$availableCert]['name'] = $availableCert;
$certdata[$availableCert]['url'] = SimpleSAML\Module::getModuleURL('saml/idp/certs.php').'/'.$availableCert; $certdata[$availableCert]['url'] = SimpleSAML\Module::getModuleURL('saml/idp/certs.php') . '/' . $availableCert;
$certdata[$availableCert]['comment'] = ( $certdata[$availableCert]['comment'] = (
$availableCerts[$availableCert]['certFingerprint'][0] === 'afe71c28ef740bc87425be13a2263d37971da1f9' ? $availableCerts[$availableCert]['certFingerprint'][0] === 'afe71c28ef740bc87425be13a2263d37971da1f9' ?
'This is the default certificate. Generate a new certificate if this is a production system.' : 'This is the default certificate. Generate a new certificate if this is a production system.' :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment