@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | if ($xml->getAttribute('Version') !== '2.0') { |
| 242 | 242 | /* Currently a very strict check. */ |
| 243 | - throw new \Exception('Unsupported version: ' . $xml->getAttribute('Version')); |
|
| 243 | + throw new \Exception('Unsupported version: '.$xml->getAttribute('Version')); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | $this->issueInstant = Utils::xsDateTimeToTimestamp($xml->getAttribute('IssueInstant')); |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | continue; |
| 341 | 341 | } |
| 342 | 342 | if ($node->namespaceURI !== Constants::NS_SAML) { |
| 343 | - throw new \Exception('Unknown namespace of condition: ' . var_export($node->namespaceURI, true)); |
|
| 343 | + throw new \Exception('Unknown namespace of condition: '.var_export($node->namespaceURI, true)); |
|
| 344 | 344 | } |
| 345 | 345 | switch ($node->localName) { |
| 346 | 346 | case 'AudienceRestriction': |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | /* Currently ignored. */ |
| 364 | 364 | break; |
| 365 | 365 | default: |
| 366 | - throw new \Exception('Unknown condition: ' . var_export($node->localName, true)); |
|
| 366 | + throw new \Exception('Unknown condition: '.var_export($node->localName, true)); |
|
| 367 | 367 | } |
| 368 | 368 | } |
| 369 | 369 | } |
@@ -1244,7 +1244,7 @@ discard block |
||
| 1244 | 1244 | $document = $parentElement->ownerDocument; |
| 1245 | 1245 | } |
| 1246 | 1246 | |
| 1247 | - $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'Assertion'); |
|
| 1247 | + $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'Assertion'); |
|
| 1248 | 1248 | $parentElement->appendChild($root); |
| 1249 | 1249 | |
| 1250 | 1250 | /* Ugly hack to add another namespace declaration to the root element. */ |
@@ -1296,7 +1296,7 @@ discard block |
||
| 1296 | 1296 | if ($this->encryptedNameId === null) { |
| 1297 | 1297 | Utils::addNameId($subject, $this->nameId); |
| 1298 | 1298 | } else { |
| 1299 | - $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID'); |
|
| 1299 | + $eid = $subject->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID'); |
|
| 1300 | 1300 | $subject->appendChild($eid); |
| 1301 | 1301 | $eid->appendChild($subject->ownerDocument->importNode($this->encryptedNameId, true)); |
| 1302 | 1302 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | case Constants::BINDING_HOK_SSO: |
| 40 | 40 | return new HTTPPost(); |
| 41 | 41 | default: |
| 42 | - throw new \Exception('Unsupported binding: ' . var_export($urn, true)); |
|
| 42 | + throw new \Exception('Unsupported binding: '.var_export($urn, true)); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | $logger = Utils::getContainer()->getLogger(); |
| 87 | 87 | $logger->warning('Unable to find the SAML 2 binding used for this request.'); |
| 88 | - $logger->warning('Request method: ' . var_export($_SERVER['REQUEST_METHOD'], true)); |
|
| 88 | + $logger->warning('Request method: '.var_export($_SERVER['REQUEST_METHOD'], true)); |
|
| 89 | 89 | if (!empty($_GET)) { |
| 90 | - $logger->warning("GET parameters: '" . implode("', '", array_map('addslashes', array_keys($_GET))) . "'"); |
|
| 90 | + $logger->warning("GET parameters: '".implode("', '", array_map('addslashes', array_keys($_GET)))."'"); |
|
| 91 | 91 | } |
| 92 | 92 | if (!empty($_POST)) { |
| 93 | - $logger->warning("POST parameters: '" . implode("', '", array_map('addslashes', array_keys($_POST))) . "'"); |
|
| 93 | + $logger->warning("POST parameters: '".implode("', '", array_map('addslashes', array_keys($_POST)))."'"); |
|
| 94 | 94 | } |
| 95 | 95 | if (isset($_SERVER['CONTENT_TYPE'])) { |
| 96 | - $logger->warning('Content-Type: ' . var_export($_SERVER['CONTENT_TYPE'], true)); |
|
| 96 | + $logger->warning('Content-Type: '.var_export($_SERVER['CONTENT_TYPE'], true)); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | throw new \Exception('Unable to find the current binding.'); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function emergency($message, array $context = array()) |
| 15 | 15 | { |
| 16 | - SimpleSAML_Logger::emergency($message . var_export($context, true)); |
|
| 16 | + SimpleSAML_Logger::emergency($message.var_export($context, true)); |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function alert($message, array $context = array()) |
| 30 | 30 | { |
| 31 | - SimpleSAML_Logger::alert($message . var_export($context, true)); |
|
| 31 | + SimpleSAML_Logger::alert($message.var_export($context, true)); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function critical($message, array $context = array()) |
| 44 | 44 | { |
| 45 | - SimpleSAML_Logger::critical($message . var_export($context, true)); |
|
| 45 | + SimpleSAML_Logger::critical($message.var_export($context, true)); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public function error($message, array $context = array()) |
| 57 | 57 | { |
| 58 | - SimpleSAML_Logger::error($message . var_export($context, true)); |
|
| 58 | + SimpleSAML_Logger::error($message.var_export($context, true)); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function warning($message, array $context = array()) |
| 72 | 72 | { |
| 73 | - SimpleSAML_Logger::warning($message . var_export($context, true)); |
|
| 73 | + SimpleSAML_Logger::warning($message.var_export($context, true)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | public function notice($message, array $context = array()) |
| 84 | 84 | { |
| 85 | - SimpleSAML_Logger::notice($message . var_export($context, true)); |
|
| 85 | + SimpleSAML_Logger::notice($message.var_export($context, true)); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function info($message, array $context = array()) |
| 98 | 98 | { |
| 99 | - SimpleSAML_Logger::info($message . var_export($context, true)); |
|
| 99 | + SimpleSAML_Logger::info($message.var_export($context, true)); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function debug($message, array $context = array()) |
| 110 | 110 | { |
| 111 | - SimpleSAML_Logger::debug($message . var_export($context, true)); |
|
| 111 | + SimpleSAML_Logger::debug($message.var_export($context, true)); |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | public function getPrivateKey($name, $required = false) |
| 49 | 49 | { |
| 50 | 50 | $privateKeys = $this->get('privateKeys'); |
| 51 | - $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) { |
|
| 51 | + $key = array_filter($privateKeys, function(PrivateKey $key) use ($name) { |
|
| 52 | 52 | return $key->getName() === $name; |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function getPrivateKey($name, $required = false) |
| 51 | 51 | { |
| 52 | 52 | $privateKeys = $this->get('privateKeys'); |
| 53 | - $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) { |
|
| 53 | + $key = array_filter($privateKeys, function(PrivateKey $key) use ($name) { |
|
| 54 | 54 | return $key->getName() === $name; |
| 55 | 55 | }); |
| 56 | 56 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | break; |
| 76 | 76 | |
| 77 | 77 | default: |
| 78 | - throw new \Exception('Unknown key type for encryption: ' . $key->type); |
|
| 78 | + throw new \Exception('Unknown key type for encryption: '.$key->type); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $this->encryptedData = $enc->encryptNode($symmetricKey); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $document = $parentElement->ownerDocument; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $root = $document->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedAssertion'); |
|
| 115 | + $root = $document->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedAssertion'); |
|
| 116 | 116 | $parentElement->appendChild($root); |
| 117 | 117 | |
| 118 | 118 | $root->appendChild($document->importNode($this->encryptedData, true)); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $generatedId = pack('H*', ((string) SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(20)))); |
| 38 | - $artifact = base64_encode("\x00\x04\x00\x00" . sha1($message->getIssuer(), true) . $generatedId) ; |
|
| 38 | + $artifact = base64_encode("\x00\x04\x00\x00".sha1($message->getIssuer(), true).$generatedId); |
|
| 39 | 39 | $artifactData = $message->toUnsignedXML(); |
| 40 | 40 | $artifactDataString = $artifactData->ownerDocument->saveXML($artifactData); |
| 41 | 41 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | if (array_key_exists('SAMLart', $_REQUEST)) { |
| 79 | 79 | $artifact = base64_decode($_REQUEST['SAMLart']); |
| 80 | - $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
| 80 | + $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
| 81 | 81 | $sourceId = bin2hex(substr($artifact, 4, 20)); |
| 82 | 82 | } else { |
| 83 | 83 | throw new \Exception('Missing SAMLArt parameter.'); |
@@ -88,12 +88,12 @@ discard block |
||
| 88 | 88 | $idpMetadata = $metadataHandler->getMetaDataConfigForSha1($sourceId, 'saml20-idp-remote'); |
| 89 | 89 | |
| 90 | 90 | if ($idpMetadata === null) { |
| 91 | - throw new \Exception('No metadata found for remote provider with SHA1 ID: ' . var_export($sourceId, true)); |
|
| 91 | + throw new \Exception('No metadata found for remote provider with SHA1 ID: '.var_export($sourceId, true)); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | $endpoint = null; |
| 95 | 95 | foreach ($idpMetadata->getEndpoints('ArtifactResolutionService') as $ep) { |
| 96 | - if ($ep['index'] === hexdec($endpointIndex)) { |
|
| 96 | + if ($ep['index'] === hexdec($endpointIndex)) { |
|
| 97 | 97 | $endpoint = $ep; |
| 98 | 98 | break; |
| 99 | 99 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | throw new \Exception('No ArtifactResolutionService with the correct index.'); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := " . $endpoint['Location']); |
|
| 106 | + Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := ".$endpoint['Location']); |
|
| 107 | 107 | |
| 108 | 108 | //Construct the ArtifactResolve Request |
| 109 | 109 | $ar = new ArtifactResolve(); |
@@ -264,7 +264,7 @@ |
||
| 264 | 264 | if ($this->encryptedNameId === null) { |
| 265 | 265 | Utils::addNameId($root, $this->nameId); |
| 266 | 266 | } else { |
| 267 | - $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:' . 'EncryptedID'); |
|
| 267 | + $eid = $root->ownerDocument->createElementNS(Constants::NS_SAML, 'saml:'.'EncryptedID'); |
|
| 268 | 268 | $root->appendChild($eid); |
| 269 | 269 | $eid->appendChild($root->ownerDocument->importNode($this->encryptedNameId, true)); |
| 270 | 270 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | |
| 150 | 150 | if ($xml->getAttribute('Version') !== '2.0') { |
| 151 | 151 | /* Currently a very strict check. */ |
| 152 | - throw new \Exception('Unsupported version: ' . $xml->getAttribute('Version')); |
|
| 152 | + throw new \Exception('Unsupported version: '.$xml->getAttribute('Version')); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | $this->issueInstant = Utils::xsDateTimeToTimestamp($xml->getAttribute('IssueInstant')); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | { |
| 402 | 402 | $this->document = DOMDocumentFactory::create(); |
| 403 | 403 | |
| 404 | - $root = $this->document->createElementNS(Constants::NS_SAMLP, 'samlp:' . $this->tagName); |
|
| 404 | + $root = $this->document->createElementNS(Constants::NS_SAMLP, 'samlp:'.$this->tagName); |
|
| 405 | 405 | $this->document->appendChild($root); |
| 406 | 406 | |
| 407 | 407 | /* Ugly hack to add another namespace declaration to the root element. */ |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | public static function fromXML(\DOMElement $xml) |
| 528 | 528 | { |
| 529 | 529 | if ($xml->namespaceURI !== Constants::NS_SAMLP) { |
| 530 | - throw new \Exception('Unknown namespace of SAML message: ' . var_export($xml->namespaceURI, true)); |
|
| 530 | + throw new \Exception('Unknown namespace of SAML message: '.var_export($xml->namespaceURI, true)); |
|
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | switch ($xml->localName) { |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | case 'ArtifactResolve': |
| 547 | 547 | return new ArtifactResolve($xml); |
| 548 | 548 | default: |
| 549 | - throw new \Exception('Unknown SAML message: ' . var_export($xml->localName, true)); |
|
| 549 | + throw new \Exception('Unknown SAML message: '.var_export($xml->localName, true)); |
|
| 550 | 550 | } |
| 551 | 551 | } |
| 552 | 552 | |