@@ -22,8 +22,8 @@ |
||
22 | 22 | return sprintf( |
23 | 23 | '%s%s%s', |
24 | 24 | $this->truncateStatus($responseStatus['Code']), |
25 | - $responseStatus['SubCode'] ? '/' . $this->truncateStatus($responseStatus['SubCode']) : '', |
|
26 | - $responseStatus['Message'] ? ' ' . $responseStatus['Message'] : '' |
|
25 | + $responseStatus['SubCode'] ? '/'.$this->truncateStatus($responseStatus['SubCode']) : '', |
|
26 | + $responseStatus['Message'] ? ' '.$responseStatus['Message'] : '' |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 |
@@ -51,25 +51,25 @@ |
||
51 | 51 | |
52 | 52 | // ported from |
53 | 53 | // https://github.com/simplesamlphp/simplesamlphp/blob/3d735912342767d391297cc5e13272a76730aca0/lib/SimpleSAML/Configuration.php#L1092 |
54 | - if ($configuration->hasValue($prefix . 'keys')) { |
|
55 | - $extracted['keys'] = $configuration->getArray($prefix . 'keys'); |
|
54 | + if ($configuration->hasValue($prefix.'keys')) { |
|
55 | + $extracted['keys'] = $configuration->getArray($prefix.'keys'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // ported from |
59 | 59 | // https://github.com/simplesamlphp/simplesamlphp/blob/3d735912342767d391297cc5e13272a76730aca0/lib/SimpleSAML/Configuration.php#L1108 |
60 | - if ($configuration->hasValue($prefix . 'certData')) { |
|
61 | - $extracted['certificateData'] = $configuration->getString($prefix . 'certData'); |
|
60 | + if ($configuration->hasValue($prefix.'certData')) { |
|
61 | + $extracted['certificateData'] = $configuration->getString($prefix.'certData'); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // ported from |
65 | 65 | // https://github.com/simplesamlphp/simplesamlphp/blob/3d735912342767d391297cc5e13272a76730aca0/lib/SimpleSAML/Configuration.php#L1119 |
66 | - if ($configuration->hasValue($prefix . 'certificate')) { |
|
67 | - $extracted['certificateData'] = $configuration->getString($prefix . 'certificate'); |
|
66 | + if ($configuration->hasValue($prefix.'certificate')) { |
|
67 | + $extracted['certificateData'] = $configuration->getString($prefix.'certificate'); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | // ported from |
71 | 71 | // https://github.com/simplesamlphp/simplesamlphp/blob/3d735912342767d391297cc5e13272a76730aca0/modules/saml/lib/Message.php#L161 |
72 | - if ($configuration->hasValue($prefix . 'certFingerprint')) { |
|
72 | + if ($configuration->hasValue($prefix.'certFingerprint')) { |
|
73 | 73 | $extracted['certificateFingerprint'] = $configuration->getArrayizeString('certFingerprint'); |
74 | 74 | } |
75 | 75 |
@@ -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)); |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | $privateKey = SimpleSAML_Utilities::loadPrivateKey($srcMetadata); |
52 | 52 | $publicKey = SimpleSAML_Utilities::loadPublicKey($srcMetadata); |
53 | 53 | if ($privateKey !== null && $publicKey !== null && isset($publicKey['PEM'])) { |
54 | - $keyCertData = $privateKey['PEM'] . $publicKey['PEM']; |
|
55 | - $file = SimpleSAML_Utilities::getTempDir() . '/' . sha1($keyCertData) . '.pem'; |
|
54 | + $keyCertData = $privateKey['PEM'].$publicKey['PEM']; |
|
55 | + $file = SimpleSAML_Utilities::getTempDir().'/'.sha1($keyCertData).'.pem'; |
|
56 | 56 | if (!file_exists($file)) { |
57 | 57 | SimpleSAML_Utilities::writeFile($file, $keyCertData); |
58 | 58 | } |
@@ -71,11 +71,11 @@ discard block |
||
71 | 71 | if ($key['type'] !== 'X509Certificate') { |
72 | 72 | continue; |
73 | 73 | } |
74 | - $certData .= "-----BEGIN CERTIFICATE-----\n" . |
|
75 | - chunk_split($key['X509Certificate'], 64) . |
|
74 | + $certData .= "-----BEGIN CERTIFICATE-----\n". |
|
75 | + chunk_split($key['X509Certificate'], 64). |
|
76 | 76 | "-----END CERTIFICATE-----\n"; |
77 | 77 | } |
78 | - $peerCertFile = SimpleSAML_Utilities::getTempDir() . '/' . sha1($certData) . '.pem'; |
|
78 | + $peerCertFile = SimpleSAML_Utilities::getTempDir().'/'.sha1($certData).'.pem'; |
|
79 | 79 | if (!file_exists($peerCertFile)) { |
80 | 80 | SimpleSAML_Utilities::writeFile($peerCertFile, $certData); |
81 | 81 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | // Add soap-envelopes |
102 | 102 | $request = $msg->toSignedXML(); |
103 | - $request = self::START_SOAP_ENVELOPE . $request->ownerDocument->saveXML($request) . self::END_SOAP_ENVELOPE; |
|
103 | + $request = self::START_SOAP_ENVELOPE.$request->ownerDocument->saveXML($request).self::END_SOAP_ENVELOPE; |
|
104 | 104 | |
105 | 105 | Utils::getContainer()->debugMessage($request, 'out'); |
106 | 106 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | // There is a fault element but we haven't found out what the fault string is |
226 | 226 | $soapFaultString = "Unknown fault string found"; |
227 | 227 | // find out the fault string |
228 | - $faultStringElement = Utils::xpQuery($soapFaultElement, './soap-env:faultstring') ; |
|
228 | + $faultStringElement = Utils::xpQuery($soapFaultElement, './soap-env:faultstring'); |
|
229 | 229 | if (!empty($faultStringElement)) { |
230 | 230 | return $faultStringElement[0]->textContent; |
231 | 231 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | CertificateProvider $configuration |
54 | 54 | ) { |
55 | 55 | $logger = $this->logger; |
56 | - $pemCandidates = $this->configuredKeys->filter(function (Key $key) use ($logger) { |
|
56 | + $pemCandidates = $this->configuredKeys->filter(function(Key $key) use ($logger) { |
|
57 | 57 | if (!$key instanceof X509) { |
58 | 58 | $logger->debug(sprintf('Skipping unknown key type: "%s"', $key['type'])); |
59 | 59 | return false; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | { |
60 | 60 | if ($this->count() !== 1) { |
61 | 61 | throw new RuntimeException(sprintf( |
62 | - __CLASS__ . '::' . __METHOD__ . ' requires that the collection has exactly one element, ' |
|
62 | + __CLASS__.'::'.__METHOD__.' requires that the collection has exactly one element, ' |
|
63 | 63 | . '"%d" elements found', |
64 | 64 | $this->count() |
65 | 65 | )); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | if (!$xml->hasAttribute('index')) { |
43 | - throw new \Exception('Missing index on ' . $xml->tagName); |
|
43 | + throw new \Exception('Missing index on '.$xml->tagName); |
|
44 | 44 | } |
45 | 45 | $this->index = (int) $xml->getAttribute('index'); |
46 | 46 |