@@ -259,7 +259,7 @@ |
||
259 | 259 | if ($this->encryptedNameId === NULL) { |
260 | 260 | SAML2_Utils::addNameId($root, $this->nameId); |
261 | 261 | } else { |
262 | - $eid = $root->ownerDocument->createElementNS(SAML2_Const::NS_SAML, 'saml:' . 'EncryptedID'); |
|
262 | + $eid = $root->ownerDocument->createElementNS(SAML2_Const::NS_SAML, 'saml:'.'EncryptedID'); |
|
263 | 263 | $root->appendChild($eid); |
264 | 264 | $eid->appendChild($root->ownerDocument->importNode($this->encryptedNameId, TRUE)); |
265 | 265 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | if ($xml->getAttribute('Version') !== '2.0') { |
145 | 145 | /* Currently a very strict check. */ |
146 | - throw new Exception('Unsupported version: ' . $xml->getAttribute('Version')); |
|
146 | + throw new Exception('Unsupported version: '.$xml->getAttribute('Version')); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | $this->issueInstant = SAML2_Utils::xsDateTimeToTimestamp($xml->getAttribute('IssueInstant')); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | { |
397 | 397 | $this->document = SAML2_DOMDocumentFactory::create(); |
398 | 398 | |
399 | - $root = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'samlp:' . $this->tagName); |
|
399 | + $root = $this->document->createElementNS(SAML2_Const::NS_SAMLP, 'samlp:'.$this->tagName); |
|
400 | 400 | $this->document->appendChild($root); |
401 | 401 | |
402 | 402 | /* Ugly hack to add another namespace declaration to the root element. */ |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | public static function fromXML(DOMElement $xml) |
523 | 523 | { |
524 | 524 | if ($xml->namespaceURI !== SAML2_Const::NS_SAMLP) { |
525 | - throw new Exception('Unknown namespace of SAML message: ' . var_export($xml->namespaceURI, TRUE)); |
|
525 | + throw new Exception('Unknown namespace of SAML message: '.var_export($xml->namespaceURI, TRUE)); |
|
526 | 526 | } |
527 | 527 | |
528 | 528 | switch ($xml->localName) { |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | case 'ArtifactResolve': |
542 | 542 | return new SAML2_ArtifactResolve($xml); |
543 | 543 | default: |
544 | - throw new Exception('Unknown SAML message: ' . var_export($xml->localName, TRUE)); |
|
544 | + throw new Exception('Unknown SAML message: '.var_export($xml->localName, TRUE)); |
|
545 | 545 | } |
546 | 546 | |
547 | 547 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | case SAML2_Const::BINDING_HOK_SSO: |
38 | 38 | return new SAML2_HTTPPost(); |
39 | 39 | default: |
40 | - throw new Exception('Unsupported binding: ' . var_export($urn, TRUE)); |
|
40 | + throw new Exception('Unsupported binding: '.var_export($urn, TRUE)); |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | |
@@ -83,15 +83,15 @@ discard block |
||
83 | 83 | |
84 | 84 | $logger = SAML2_Utils::getContainer()->getLogger(); |
85 | 85 | $logger->warning('Unable to find the SAML 2 binding used for this request.'); |
86 | - $logger->warning('Request method: ' . var_export($_SERVER['REQUEST_METHOD'], TRUE)); |
|
86 | + $logger->warning('Request method: '.var_export($_SERVER['REQUEST_METHOD'], TRUE)); |
|
87 | 87 | if (!empty($_GET)) { |
88 | - $logger->warning("GET parameters: '" . implode("', '", array_map('addslashes', array_keys($_GET))) . "'"); |
|
88 | + $logger->warning("GET parameters: '".implode("', '", array_map('addslashes', array_keys($_GET)))."'"); |
|
89 | 89 | } |
90 | 90 | if (!empty($_POST)) { |
91 | - $logger->warning("POST parameters: '" . implode("', '", array_map('addslashes', array_keys($_POST))) . "'"); |
|
91 | + $logger->warning("POST parameters: '".implode("', '", array_map('addslashes', array_keys($_POST)))."'"); |
|
92 | 92 | } |
93 | 93 | if (isset($_SERVER['CONTENT_TYPE'])) { |
94 | - $logger->warning('Content-Type: ' . var_export($_SERVER['CONTENT_TYPE'], TRUE)); |
|
94 | + $logger->warning('Content-Type: '.var_export($_SERVER['CONTENT_TYPE'], TRUE)); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | throw new Exception('Unable to find the current binding.'); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | $privateKey = SimpleSAML_Utilities::loadPrivateKey($srcMetadata); |
47 | 47 | $publicKey = SimpleSAML_Utilities::loadPublicKey($srcMetadata); |
48 | 48 | if ($privateKey !== NULL && $publicKey !== NULL && isset($publicKey['PEM'])) { |
49 | - $keyCertData = $privateKey['PEM'] . $publicKey['PEM']; |
|
50 | - $file = SimpleSAML_Utilities::getTempDir() . '/' . sha1($keyCertData) . '.pem'; |
|
49 | + $keyCertData = $privateKey['PEM'].$publicKey['PEM']; |
|
50 | + $file = SimpleSAML_Utilities::getTempDir().'/'.sha1($keyCertData).'.pem'; |
|
51 | 51 | if (!file_exists($file)) { |
52 | 52 | SimpleSAML_Utilities::writeFile($file, $keyCertData); |
53 | 53 | } |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | if ($key['type'] !== 'X509Certificate') { |
67 | 67 | continue; |
68 | 68 | } |
69 | - $certData .= "-----BEGIN CERTIFICATE-----\n" . |
|
70 | - chunk_split($key['X509Certificate'], 64) . |
|
69 | + $certData .= "-----BEGIN CERTIFICATE-----\n". |
|
70 | + chunk_split($key['X509Certificate'], 64). |
|
71 | 71 | "-----END CERTIFICATE-----\n"; |
72 | 72 | } |
73 | - $peerCertFile = SimpleSAML_Utilities::getTempDir() . '/' . sha1($certData) . '.pem'; |
|
73 | + $peerCertFile = SimpleSAML_Utilities::getTempDir().'/'.sha1($certData).'.pem'; |
|
74 | 74 | if (!file_exists($peerCertFile)) { |
75 | 75 | SimpleSAML_Utilities::writeFile($peerCertFile, $certData); |
76 | 76 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | // Add soap-envelopes |
97 | 97 | $request = $msg->toSignedXML(); |
98 | - $request = self::START_SOAP_ENVELOPE . $request->ownerDocument->saveXML($request) . self::END_SOAP_ENVELOPE; |
|
98 | + $request = self::START_SOAP_ENVELOPE.$request->ownerDocument->saveXML($request).self::END_SOAP_ENVELOPE; |
|
99 | 99 | |
100 | 100 | SAML2_Utils::getContainer()->debugMessage($request, 'out'); |
101 | 101 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | // There is a fault element but we haven't found out what the fault string is |
222 | 222 | $soapFaultString = "Unknown fault string found"; |
223 | 223 | // find out the fault string |
224 | - $faultStringElement = SAML2_Utils::xpQuery($soapFaultElement, './soap-env:faultstring') ; |
|
224 | + $faultStringElement = SAML2_Utils::xpQuery($soapFaultElement, './soap-env:faultstring'); |
|
225 | 225 | if (!empty($faultStringElement)) { |
226 | 226 | return $faultStringElement[0]->textContent; |
227 | 227 | } |
@@ -45,21 +45,21 @@ discard block |
||
45 | 45 | $msg .= urlencode($msgStr); |
46 | 46 | |
47 | 47 | if ($relayState !== NULL) { |
48 | - $msg .= '&RelayState=' . urlencode($relayState); |
|
48 | + $msg .= '&RelayState='.urlencode($relayState); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | if ($key !== NULL) { |
52 | 52 | /* Add the signature. */ |
53 | - $msg .= '&SigAlg=' . urlencode($key->type); |
|
53 | + $msg .= '&SigAlg='.urlencode($key->type); |
|
54 | 54 | |
55 | 55 | $signature = $key->signData($msg); |
56 | - $msg .= '&Signature=' . urlencode(base64_encode($signature)); |
|
56 | + $msg .= '&Signature='.urlencode(base64_encode($signature)); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | if (strpos($destination, '?') === FALSE) { |
60 | - $destination .= '?' . $msg; |
|
60 | + $destination .= '?'.$msg; |
|
61 | 61 | } else { |
62 | - $destination .= '&' . $msg; |
|
62 | + $destination .= '&'.$msg; |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | return $destination; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function send(SAML2_Message $message) |
76 | 76 | { |
77 | 77 | $destination = $this->getRedirectURL($message); |
78 | - SAML2_Utils::getContainer()->getLogger()->debug('Redirect to ' . strlen($destination) . ' byte URL: ' . $destination); |
|
78 | + SAML2_Utils::getContainer()->getLogger()->debug('Redirect to '.strlen($destination).' byte URL: '.$destination); |
|
79 | 79 | SAML2_Utils::getContainer()->redirect($destination); |
80 | 80 | } |
81 | 81 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if (isset($data['SAMLEncoding']) && $data['SAMLEncoding'] !== self::DEFLATE) { |
105 | - throw new Exception('Unknown SAMLEncoding: ' . var_export($data['SAMLEncoding'], TRUE)); |
|
105 | + throw new Exception('Unknown SAMLEncoding: '.var_export($data['SAMLEncoding'], TRUE)); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | $message = base64_decode($message); |
@@ -178,18 +178,18 @@ discard block |
||
178 | 178 | switch ($name) { |
179 | 179 | case 'SAMLRequest': |
180 | 180 | case 'SAMLResponse': |
181 | - $sigQuery = $name . '=' . $value; |
|
181 | + $sigQuery = $name.'='.$value; |
|
182 | 182 | break; |
183 | 183 | case 'RelayState': |
184 | - $relayState = '&RelayState=' . $value; |
|
184 | + $relayState = '&RelayState='.$value; |
|
185 | 185 | break; |
186 | 186 | case 'SigAlg': |
187 | - $sigAlg = '&SigAlg=' . $value; |
|
187 | + $sigAlg = '&SigAlg='.$value; |
|
188 | 188 | break; |
189 | 189 | } |
190 | 190 | } |
191 | 191 | |
192 | - $data['SignedQuery'] = $sigQuery . $relayState . $sigAlg; |
|
192 | + $data['SignedQuery'] = $sigQuery.$relayState.$sigAlg; |
|
193 | 193 | |
194 | 194 | return $data; |
195 | 195 | } |