@@ -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 |
@@ -53,8 +53,8 @@ |
||
53 | 53 | const CM_BEARER = 'urn:oasis:names:tc:SAML:2.0:cm:bearer'; |
54 | 54 | |
55 | 55 | /** |
56 | - * Holder-of-Key subject confirmation method. |
|
57 | - */ |
|
56 | + * Holder-of-Key subject confirmation method. |
|
57 | + */ |
|
58 | 58 | const CM_HOK = 'urn:oasis:names:tc:SAML:2.0:cm:holder-of-key'; |
59 | 59 | |
60 | 60 | /** |
@@ -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)); |
@@ -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 |
@@ -118,7 +118,7 @@ |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | if (!$xml->hasAttribute('protocolSupportEnumeration')) { |
121 | - throw new \Exception('Missing protocolSupportEnumeration attribute on ' . $xml->localName); |
|
121 | + throw new \Exception('Missing protocolSupportEnumeration attribute on '.$xml->localName); |
|
122 | 122 | } |
123 | 123 | $this->protocolSupportEnumeration = preg_split('/[\s]+/', $xml->getAttribute('protocolSupportEnumeration')); |
124 | 124 |
@@ -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 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function emergency($message, array $context = array()) |
17 | 17 | { |
18 | - \SimpleSAML\Logger::emergency($message . var_export($context, true)); |
|
18 | + \SimpleSAML\Logger::emergency($message.var_export($context, true)); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | public function alert($message, array $context = array()) |
32 | 32 | { |
33 | - \SimpleSAML\Logger::alert($message . var_export($context, true)); |
|
33 | + \SimpleSAML\Logger::alert($message.var_export($context, true)); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function critical($message, array $context = array()) |
46 | 46 | { |
47 | - \SimpleSAML\Logger::critical($message . var_export($context, true)); |
|
47 | + \SimpleSAML\Logger::critical($message.var_export($context, true)); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | /** |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function error($message, array $context = array()) |
59 | 59 | { |
60 | - \SimpleSAML\Logger::error($message . var_export($context, true)); |
|
60 | + \SimpleSAML\Logger::error($message.var_export($context, true)); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function warning($message, array $context = array()) |
74 | 74 | { |
75 | - \SimpleSAML\Logger::warning($message . var_export($context, true)); |
|
75 | + \SimpleSAML\Logger::warning($message.var_export($context, true)); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function notice($message, array $context = array()) |
86 | 86 | { |
87 | - \SimpleSAML\Logger::notice($message . var_export($context, true)); |
|
87 | + \SimpleSAML\Logger::notice($message.var_export($context, true)); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function info($message, array $context = array()) |
100 | 100 | { |
101 | - \SimpleSAML\Logger::info($message . var_export($context, true)); |
|
101 | + \SimpleSAML\Logger::info($message.var_export($context, true)); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function debug($message, array $context = array()) |
112 | 112 | { |
113 | - \SimpleSAML\Logger::debug($message . var_export($context, true)); |
|
113 | + \SimpleSAML\Logger::debug($message.var_export($context, true)); |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | /** |