Skip to content

Commit 031d007

Browse files
committed
namespaced classes
1 parent 17b448e commit 031d007

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

www/attributeserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
require_once('_include.php');
1111

12-
SimpleSAML_Logger::info('SAML2.0 - AA Server: Request at SAML 2.0 Attribute Authority endpoint');
12+
SimpleSAML\Logger::info('SAML2.0 - AA Server: Request at SAML 2.0 Attribute Authority endpoint');
1313

1414
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
1515

www/metadata.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

33
/* Load simpleSAMLphp, configuration and metadata */
4-
$config = SimpleSAML_Configuration::getInstance();
4+
$config = SimpleSAML\Configuration::getInstance();
55
$metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
66

77
/* Check if valid local session exists.. */
88
if ($config->getBoolean('admin.protectmetadata', false)) {
9-
SimpleSAML_Utilities::requireAdmin();
9+
SimpleSAML\Utils\Auth::requireAdmin();
1010
}
1111

1212
try {
@@ -16,7 +16,7 @@
1616
$availableCerts = array();
1717

1818
$keys = array();
19-
$certInfo = SimpleSAML_Utilities::loadPublicKey($aameta, false, 'new_');
19+
$certInfo = SimpleSAML\Utils\Crypto::loadPublicKey($aameta, false, 'new_');
2020
if ($certInfo !== null) {
2121
$availableCerts['new_aa.crt'] = $certInfo;
2222
$keys[] = array(
@@ -30,7 +30,7 @@
3030
$hasNewCert = false;
3131
}
3232

33-
$certInfo = SimpleSAML_Utilities::loadPublicKey($aameta, true);
33+
$certInfo = SimpleSAML\Utils\Crypto::loadPublicKey($aameta, true);
3434
$availableCerts['aa.crt'] = $certInfo;
3535
$keys[] = array(
3636
'type' => 'X509Certificate',
@@ -40,7 +40,7 @@
4040
);
4141

4242
if ($aameta->hasValue('https.certificate')) {
43-
$httpsCert = SimpleSAML_Utilities::loadPublicKey($aameta, true, 'https.');
43+
$httpsCert = SimpleSAML\Utils\Crypto::loadPublicKey($aameta, true, 'https.');
4444
assert('isset($httpsCert["certData"])');
4545
$availableCerts['https.crt'] = $httpsCert;
4646
$keys[] = array(
@@ -54,10 +54,10 @@
5454
$metaArray = array(
5555
'metadata-set' => 'attributeauthority-hosted',
5656
'entityid' => $aaentityid,
57-
'protocols' => array(SAML2_Const::NS_SAMLP),
57+
'protocols' => array(SAML2\Constants::NS_SAMLP),
5858
'AttributeService' => array(0 => array(
59-
'Binding' => SAML2_Const::BINDING_SOAP,
60-
'Location' => SimpleSAML_Utilities::getBaseURL().'module.php/aa/attributeserver.php',
59+
'Binding' => SAML2\Constants::BINDING_SOAP,
60+
'Location' => SimpleSAML\Utils\HTTP::getBaseURL().'module.php/aa/attributeserver.php',
6161
),
6262
),
6363
);
@@ -69,8 +69,8 @@
6969
}
7070

7171
$metaArray['NameIDFormat'] = array(
72-
SAML2_Const::NAMEID_PERSISTENT,
73-
SAML2_Const::NAMEID_TRANSIENT,
72+
SAML2\Constants::NAMEID_PERSISTENT,
73+
SAML2\Constants::NAMEID_TRANSIENT,
7474
);
7575

7676
if ($aameta->hasValue('OrganizationName')) {
@@ -81,7 +81,7 @@
8181
);
8282

8383
if (!$aameta->hasValue('OrganizationURL')) {
84-
throw new SimpleSAML_Error_Exception('If OrganizationName is set, OrganizationURL must also be set.');
84+
throw new SimpleSAML\Error\Exception('If OrganizationName is set, OrganizationURL must also be set.');
8585
}
8686
$metaArray['OrganizationURL'] = $aameta->getLocalizedString('OrganizationURL');
8787
}
@@ -115,10 +115,10 @@
115115
if (array_key_exists('output', $_GET) && $_GET['output'] == 'xhtml') {
116116
$defaultaa = null;
117117

118-
$t = new SimpleSAML_XHTML_Template($config, 'metadata.php', 'admin');
118+
$t = new SimpleSAML\XHTML\Template($config, 'metadata.php', 'admin');
119119

120120
$t->data['header'] = 'saml20-aa';
121-
$t->data['metaurl'] = SimpleSAML_Utilities::selfURLNoQuery();
121+
$t->data['metaurl'] = SimpleSAML\Utils\HTTP::getSelfURLNoQuery();
122122
$t->data['metadata'] = htmlspecialchars($metaxml);
123123
$t->data['metadataflat'] = htmlspecialchars($metaflat);
124124
$t->data['defaultaa'] = $defaultaa;
@@ -130,5 +130,5 @@
130130
exit(0);
131131
}
132132
} catch (Exception $exception) {
133-
throw new SimpleSAML_Error_Error('METADATA', $exception);
133+
throw new SimpleSAML\Error\Error('METADATA', $exception);
134134
}

0 commit comments

Comments
 (0)