@@ -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 | } |
@@ -355,7 +355,7 @@ |
||
| 355 | 355 | /** |
| 356 | 356 | * Retrieve the issuer if this message. |
| 357 | 357 | * |
| 358 | - * @return string|\SAML2\XML\saml\Issuer|null The issuer of this message, or NULL if no issuer is given |
|
| 358 | + * @return string The issuer of this message, or NULL if no issuer is given |
|
| 359 | 359 | */ |
| 360 | 360 | public function getIssuer() |
| 361 | 361 | { |
@@ -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) { |
@@ -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)); |
@@ -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.'); |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public function emergency($message, array $context = []) |
| 18 | 18 | { |
| 19 | - \SimpleSAML\Logger::emergency($message . ($context ? " " . var_export($context, true) : "")); |
|
| 19 | + \SimpleSAML\Logger::emergency($message.($context ? " ".var_export($context, true) : "")); |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function alert($message, array $context = []) |
| 33 | 33 | { |
| 34 | - \SimpleSAML\Logger::alert($message . ($context ? " " . var_export($context, true) : "")); |
|
| 34 | + \SimpleSAML\Logger::alert($message.($context ? " ".var_export($context, true) : "")); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function critical($message, array $context = []) |
| 47 | 47 | { |
| 48 | - \SimpleSAML\Logger::critical($message . ($context ? " " . var_export($context, true) : "")); |
|
| 48 | + \SimpleSAML\Logger::critical($message.($context ? " ".var_export($context, true) : "")); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function error($message, array $context = []) |
| 60 | 60 | { |
| 61 | - \SimpleSAML\Logger::error($message . ($context ? " " . var_export($context, true) : "")); |
|
| 61 | + \SimpleSAML\Logger::error($message.($context ? " ".var_export($context, true) : "")); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function warning($message, array $context = []) |
| 75 | 75 | { |
| 76 | - \SimpleSAML\Logger::warning($message . ($context ? " " . var_export($context, true) : "")); |
|
| 76 | + \SimpleSAML\Logger::warning($message.($context ? " ".var_export($context, true) : "")); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function notice($message, array $context = []) |
| 87 | 87 | { |
| 88 | - \SimpleSAML\Logger::notice($message . ($context ? " " . var_export($context, true) : "")); |
|
| 88 | + \SimpleSAML\Logger::notice($message.($context ? " ".var_export($context, true) : "")); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function info($message, array $context = []) |
| 101 | 101 | { |
| 102 | - \SimpleSAML\Logger::info($message . ($context ? " " . var_export($context, true) : "")); |
|
| 102 | + \SimpleSAML\Logger::info($message.($context ? " ".var_export($context, true) : "")); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public function debug($message, array $context = []) |
| 113 | 113 | { |
| 114 | - \SimpleSAML\Logger::debug($message . ($context ? " " . var_export($context, true) : "")); |
|
| 114 | + \SimpleSAML\Logger::debug($message.($context ? " ".var_export($context, true) : "")); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use SAML2\Certificate\Exception\InvalidCertificateStructureException; |
| 8 | 8 | use SAML2\Certificate\Exception\NoKeysFoundException; |
| 9 | 9 | use SAML2\Configuration\CertificateProvider; |
| 10 | -use SAML2\Exception\InvalidArgumentException; |
|
| 11 | 10 | use SAML2\Utilities\Certificate; |
| 12 | 11 | use SAML2\Utilities\File; |
| 13 | 12 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | public function getPrivateKey(string $name, bool $required = false) |
| 54 | 54 | { |
| 55 | 55 | $privateKeys = $this->get('privateKeys'); |
| 56 | - $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) { |
|
| 56 | + $key = array_filter($privateKeys, function(PrivateKey $key) use ($name) { |
|
| 57 | 57 | return $key->getName() === $name; |
| 58 | 58 | }); |
| 59 | 59 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | public function getPrivateKey(string $name, bool $required = false) |
| 52 | 52 | { |
| 53 | 53 | $privateKeys = $this->get('privateKeys'); |
| 54 | - $key = array_filter($privateKeys, function (PrivateKey $key) use ($name) { |
|
| 54 | + $key = array_filter($privateKeys, function(PrivateKey $key) use ($name) { |
|
| 55 | 55 | return $key->getName() === $name; |
| 56 | 56 | }); |
| 57 | 57 | |