@@ -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 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function getPrivateKey($name, $required = FALSE) |
| 47 | 47 | { |
| 48 | 48 | $privateKeys = $this->get('privateKeys'); |
| 49 | - $key = array_filter($privateKeys, function (SAML2_Configuration_PrivateKey $key) use ($name) { |
|
| 49 | + $key = array_filter($privateKeys, function(SAML2_Configuration_PrivateKey $key) use ($name) { |
|
| 50 | 50 | return $key->getName() === $name; |
| 51 | 51 | }); |
| 52 | 52 | |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function getPrivateKey($name, $required = FALSE) |
| 47 | 47 | { |
| 48 | 48 | $privateKeys = $this->get('privateKeys'); |
| 49 | - $key = array_filter($privateKeys, function (SAML2_Configuration_PrivateKey $key) use ($name) { |
|
| 49 | + $key = array_filter($privateKeys, function(SAML2_Configuration_PrivateKey $key) use ($name) { |
|
| 50 | 50 | return $key->getName() === $name; |
| 51 | 51 | }); |
| 52 | 52 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | SAML2_Configuration_CertificateProvider $configuration |
| 46 | 46 | ) { |
| 47 | 47 | $logger = $this->logger; |
| 48 | - $pemCandidates = $this->configuredKeys->filter(function (SAML2_Certificate_Key $key) use ($logger) { |
|
| 48 | + $pemCandidates = $this->configuredKeys->filter(function(SAML2_Certificate_Key $key) use ($logger) { |
|
| 49 | 49 | if (!$key instanceof SAML2_Certificate_X509) { |
| 50 | 50 | $logger->debug(sprintf('Skipping unknown key type: "%s"', $key['type'])); |
| 51 | 51 | return FALSE; |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | throw new SAML2_Signature_MissingConfigurationException(sprintf( |
| 70 | 70 | 'No certificates or fingerprints have been configured%s', |
| 71 | - $configuration->has('entityid') ? ' for "' . $configuration->get('entityid') . '"' : '' |
|
| 71 | + $configuration->has('entityid') ? ' for "'.$configuration->get('entityid').'"' : '' |
|
| 72 | 72 | )); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | SAML2_SignedElement $signedElement, |
| 58 | 58 | SAML2_Configuration_CertificateProvider $configuration |
| 59 | 59 | ) { |
| 60 | - $this->certificates = array_map(function ($certificate) { |
|
| 60 | + $this->certificates = array_map(function($certificate) { |
|
| 61 | 61 | return SAML2_Certificate_X509::createFromCertificateData($certificate); |
| 62 | 62 | }, $this->certificates); |
| 63 | 63 | |
@@ -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 | } |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Serializable class used to hold an XML element. |
|
| 4 | - * |
|
| 5 | - * @package SimpleSAMLphp |
|
| 6 | - */ |
|
| 3 | + * Serializable class used to hold an XML element. |
|
| 4 | + * |
|
| 5 | + * @package SimpleSAMLphp |
|
| 6 | + */ |
|
| 7 | 7 | class SAML2_XML_Chunk implements Serializable |
| 8 | 8 | { |
| 9 | 9 | /** |