@@ -49,21 +49,21 @@ discard block |
||
| 49 | 49 | $msg .= urlencode($msgStr); |
| 50 | 50 | |
| 51 | 51 | if ($relayState !== null) { |
| 52 | - $msg .= '&RelayState=' . urlencode($relayState); |
|
| 52 | + $msg .= '&RelayState='.urlencode($relayState); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | if ($key !== null) { |
| 56 | 56 | /* Add the signature. */ |
| 57 | - $msg .= '&SigAlg=' . urlencode($key->type); |
|
| 57 | + $msg .= '&SigAlg='.urlencode($key->type); |
|
| 58 | 58 | |
| 59 | 59 | $signature = $key->signData($msg); |
| 60 | - $msg .= '&Signature=' . urlencode(base64_encode($signature)); |
|
| 60 | + $msg .= '&Signature='.urlencode(base64_encode($signature)); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | if (strpos($destination, '?') === false) { |
| 64 | - $destination .= '?' . $msg; |
|
| 64 | + $destination .= '?'.$msg; |
|
| 65 | 65 | } else { |
| 66 | - $destination .= '&' . $msg; |
|
| 66 | + $destination .= '&'.$msg; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $destination; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | public function send(Message $message) |
| 80 | 80 | { |
| 81 | 81 | $destination = $this->getRedirectURL($message); |
| 82 | - Utils::getContainer()->getLogger()->debug('Redirect to ' . strlen($destination) . ' byte URL: ' . $destination); |
|
| 82 | + Utils::getContainer()->getLogger()->debug('Redirect to '.strlen($destination).' byte URL: '.$destination); |
|
| 83 | 83 | Utils::getContainer()->redirect($destination); |
| 84 | 84 | } |
| 85 | 85 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | if (isset($data['SAMLEncoding']) && $data['SAMLEncoding'] !== self::DEFLATE) { |
| 109 | - throw new \Exception('Unknown SAMLEncoding: ' . var_export($data['SAMLEncoding'], true)); |
|
| 109 | + throw new \Exception('Unknown SAMLEncoding: '.var_export($data['SAMLEncoding'], true)); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $message = base64_decode($message); |
@@ -182,18 +182,18 @@ discard block |
||
| 182 | 182 | switch ($name) { |
| 183 | 183 | case 'SAMLRequest': |
| 184 | 184 | case 'SAMLResponse': |
| 185 | - $sigQuery = $name . '=' . $value; |
|
| 185 | + $sigQuery = $name.'='.$value; |
|
| 186 | 186 | break; |
| 187 | 187 | case 'RelayState': |
| 188 | - $relayState = '&RelayState=' . $value; |
|
| 188 | + $relayState = '&RelayState='.$value; |
|
| 189 | 189 | break; |
| 190 | 190 | case 'SigAlg': |
| 191 | - $sigAlg = '&SigAlg=' . $value; |
|
| 191 | + $sigAlg = '&SigAlg='.$value; |
|
| 192 | 192 | break; |
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - $data['SignedQuery'] = $sigQuery . $relayState . $sigAlg; |
|
| 196 | + $data['SignedQuery'] = $sigQuery.$relayState.$sigAlg; |
|
| 197 | 197 | |
| 198 | 198 | return $data; |
| 199 | 199 | } |
@@ -54,8 +54,8 @@ |
||
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $this->IPHint = Utils::extractStrings($xml, Common::NS, 'IPHint'); |
|
| 58 | - $this->DomainHint = Utils::extractStrings($xml, Common::NS, 'DomainHint'); |
|
| 57 | + $this->IPHint = Utils::extractStrings($xml, Common::NS, 'IPHint'); |
|
| 58 | + $this->DomainHint = Utils::extractStrings($xml, Common::NS, 'DomainHint'); |
|
| 59 | 59 | $this->GeolocationHint = Utils::extractStrings($xml, Common::NS, 'GeolocationHint'); |
| 60 | 60 | |
| 61 | 61 | foreach (Utils::xpQuery($xml, "./*[namespace-uri()!='".Common::NS."']") as $node) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $generatedId = pack('H*', ((string) SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(20)))); |
| 42 | - $artifact = base64_encode("\x00\x04\x00\x00" . sha1($message->getIssuer(), true) . $generatedId) ; |
|
| 42 | + $artifact = base64_encode("\x00\x04\x00\x00".sha1($message->getIssuer(), true).$generatedId); |
|
| 43 | 43 | $artifactData = $message->toUnsignedXML(); |
| 44 | 44 | $artifactDataString = $artifactData->ownerDocument->saveXML($artifactData); |
| 45 | 45 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | if (array_key_exists('SAMLart', $_REQUEST)) { |
| 83 | 83 | $artifact = base64_decode($_REQUEST['SAMLart']); |
| 84 | - $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
| 84 | + $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
| 85 | 85 | $sourceId = bin2hex(substr($artifact, 4, 20)); |
| 86 | 86 | } else { |
| 87 | 87 | throw new \Exception('Missing SAMLart parameter.'); |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | $idpMetadata = $metadataHandler->getMetaDataConfigForSha1($sourceId, 'saml20-idp-remote'); |
| 93 | 93 | |
| 94 | 94 | if ($idpMetadata === null) { |
| 95 | - throw new \Exception('No metadata found for remote provider with SHA1 ID: ' . var_export($sourceId, true)); |
|
| 95 | + throw new \Exception('No metadata found for remote provider with SHA1 ID: '.var_export($sourceId, true)); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $endpoint = null; |
| 99 | 99 | foreach ($idpMetadata->getEndpoints('ArtifactResolutionService') as $ep) { |
| 100 | - if ($ep['index'] === hexdec($endpointIndex)) { |
|
| 100 | + if ($ep['index'] === hexdec($endpointIndex)) { |
|
| 101 | 101 | $endpoint = $ep; |
| 102 | 102 | break; |
| 103 | 103 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | throw new \Exception('No ArtifactResolutionService with the correct index.'); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | - Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := " . $endpoint['Location']); |
|
| 110 | + Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := ".$endpoint['Location']); |
|
| 111 | 111 | |
| 112 | 112 | //Construct the ArtifactResolve Request |
| 113 | 113 | $ar = new ArtifactResolve(); |
@@ -264,7 +264,7 @@ |
||
| 264 | 264 | if ($this->encryptedNameId === null) { |
| 265 | 265 | $this->nameId->toXML($root); |
| 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 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | if (strpos($keyword, "+") !== false) { |
| 73 | 73 | throw new \Exception('Keywords may not contain a "+" character.'); |
| 74 | 74 | } |
| 75 | - $value .= str_replace(' ', '+', $keyword) . ' '; |
|
| 75 | + $value .= str_replace(' ', '+', $keyword).' '; |
|
| 76 | 76 | } |
| 77 | 77 | $value = rtrim($value); |
| 78 | 78 | $e->appendChild($doc->createTextNode($value)); |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | |
| 75 | 75 | throw new MissingConfigurationException(sprintf( |
| 76 | 76 | 'No certificates or fingerprints have been configured%s', |
| 77 | - $configuration->has('entityid') ? ' for "' . $configuration->get('entityid') . '"' : '' |
|
| 77 | + $configuration->has('entityid') ? ' for "'.$configuration->get('entityid').'"' : '' |
|
| 78 | 78 | )); |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | SignedElement $signedElement, |
| 71 | 71 | CertificateProvider $configuration |
| 72 | 72 | ) { |
| 73 | - $this->certificates = array_map(function ($certificate) { |
|
| 73 | + $this->certificates = array_map(function($certificate) { |
|
| 74 | 74 | return X509::createFromCertificateData($certificate); |
| 75 | 75 | }, $this->certificates); |
| 76 | 76 | |
@@ -176,8 +176,8 @@ |
||
| 176 | 176 | foreach ($this->certificates as $cert) { |
| 177 | 177 | |
| 178 | 178 | /* Construct a PEM formatted certificate */ |
| 179 | - $pemCert = "-----BEGIN CERTIFICATE-----\n" . |
|
| 180 | - chunk_split($cert, 64) . |
|
| 179 | + $pemCert = "-----BEGIN CERTIFICATE-----\n". |
|
| 180 | + chunk_split($cert, 64). |
|
| 181 | 181 | "-----END CERTIFICATE-----\n"; |
| 182 | 182 | |
| 183 | 183 | /* Extract the public key from the certificate for validation. */ |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | case Constants::BINDING_PAOS: |
| 45 | 45 | return new SOAP(); |
| 46 | 46 | default: |
| 47 | - throw new \Exception('Unsupported binding: ' . var_export($urn, true)); |
|
| 47 | + throw new \Exception('Unsupported binding: '.var_export($urn, true)); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -90,15 +90,15 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $logger = Utils::getContainer()->getLogger(); |
| 92 | 92 | $logger->warning('Unable to find the SAML 2 binding used for this request.'); |
| 93 | - $logger->warning('Request method: ' . var_export($_SERVER['REQUEST_METHOD'], true)); |
|
| 93 | + $logger->warning('Request method: '.var_export($_SERVER['REQUEST_METHOD'], true)); |
|
| 94 | 94 | if (!empty($_GET)) { |
| 95 | - $logger->warning("GET parameters: '" . implode("', '", array_map('addslashes', array_keys($_GET))) . "'"); |
|
| 95 | + $logger->warning("GET parameters: '".implode("', '", array_map('addslashes', array_keys($_GET)))."'"); |
|
| 96 | 96 | } |
| 97 | 97 | if (!empty($_POST)) { |
| 98 | - $logger->warning("POST parameters: '" . implode("', '", array_map('addslashes', array_keys($_POST))) . "'"); |
|
| 98 | + $logger->warning("POST parameters: '".implode("', '", array_map('addslashes', array_keys($_POST)))."'"); |
|
| 99 | 99 | } |
| 100 | 100 | if (isset($_SERVER['CONTENT_TYPE'])) { |
| 101 | - $logger->warning('Content-Type: ' . var_export($_SERVER['CONTENT_TYPE'], true)); |
|
| 101 | + $logger->warning('Content-Type: '.var_export($_SERVER['CONTENT_TYPE'], true)); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | throw new \Exception('Unable to find the current binding.'); |