@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | $generatedId = pack('H*', ((string) SimpleSAML_Utilities::stringToHex(SimpleSAML_Utilities::generateRandomBytes(20)))); |
33 | - $artifact = base64_encode("\x00\x04\x00\x00" . sha1($message->getIssuer(), TRUE) . $generatedId) ; |
|
33 | + $artifact = base64_encode("\x00\x04\x00\x00".sha1($message->getIssuer(), TRUE).$generatedId); |
|
34 | 34 | $artifactData = $message->toUnsignedXML(); |
35 | 35 | $artifactDataString = $artifactData->ownerDocument->saveXML($artifactData); |
36 | 36 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | if (array_key_exists('SAMLart', $_REQUEST)) { |
74 | 74 | $artifact = base64_decode($_REQUEST['SAMLart']); |
75 | - $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
75 | + $endpointIndex = bin2hex(substr($artifact, 2, 2)); |
|
76 | 76 | $sourceId = bin2hex(substr($artifact, 4, 20)); |
77 | 77 | |
78 | 78 | } else { |
@@ -84,12 +84,12 @@ discard block |
||
84 | 84 | $idpMetadata = $metadataHandler->getMetaDataConfigForSha1($sourceId, 'saml20-idp-remote'); |
85 | 85 | |
86 | 86 | if ($idpMetadata === NULL) { |
87 | - throw new Exception('No metadata found for remote provider with SHA1 ID: ' . var_export($sourceId, TRUE)); |
|
87 | + throw new Exception('No metadata found for remote provider with SHA1 ID: '.var_export($sourceId, TRUE)); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $endpoint = NULL; |
91 | 91 | foreach ($idpMetadata->getEndpoints('ArtifactResolutionService') as $ep) { |
92 | - if ($ep['index'] === hexdec($endpointIndex)) { |
|
92 | + if ($ep['index'] === hexdec($endpointIndex)) { |
|
93 | 93 | $endpoint = $ep; |
94 | 94 | break; |
95 | 95 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | throw new Exception('No ArtifactResolutionService with the correct index.'); |
100 | 100 | } |
101 | 101 | |
102 | - SAML2_Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := " . $endpoint['Location']); |
|
102 | + SAML2_Utils::getContainer()->getLogger()->debug("ArtifactResolutionService endpoint being used is := ".$endpoint['Location']); |
|
103 | 103 | |
104 | 104 | //Construct the ArtifactResolve Request |
105 | 105 | $ar = new SAML2_ArtifactResolve(); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | if (!$xml->hasAttribute('index')) { |
39 | - throw new Exception('Missing index on ' . $xml->tagName); |
|
39 | + throw new Exception('Missing index on '.$xml->tagName); |
|
40 | 40 | } |
41 | 41 | $this->index = (int) $xml->getAttribute('index'); |
42 | 42 |
@@ -112,7 +112,7 @@ |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | if (!$xml->hasAttribute('protocolSupportEnumeration')) { |
115 | - throw new Exception('Missing protocolSupportEnumeration attribute on ' . $xml->localName); |
|
115 | + throw new Exception('Missing protocolSupportEnumeration attribute on '.$xml->localName); |
|
116 | 116 | } |
117 | 117 | $this->protocolSupportEnumeration = preg_split('/[\s]+/', $xml->getAttribute('protocolSupportEnumeration')); |
118 | 118 |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | if (!$xml->hasAttribute('Binding')) { |
51 | - throw new Exception('Missing Binding on ' . $xml->tagName); |
|
51 | + throw new Exception('Missing Binding on '.$xml->tagName); |
|
52 | 52 | } |
53 | 53 | $this->Binding = $xml->getAttribute('Binding'); |
54 | 54 | |
55 | 55 | if (!$xml->hasAttribute('Location')) { |
56 | - throw new Exception('Missing Location on ' . $xml->tagName); |
|
56 | + throw new Exception('Missing Location on '.$xml->tagName); |
|
57 | 57 | } |
58 | 58 | $this->Location = $xml->getAttribute('Location'); |
59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ($a->namespaceURI === NULL) { |
66 | 66 | continue; /* Not namespace-qualified -- skip. */ |
67 | 67 | } |
68 | - $fullName = '{' . $a->namespaceURI . '}' . $a->localName; |
|
68 | + $fullName = '{'.$a->namespaceURI.'}'.$a->localName; |
|
69 | 69 | $this->attributes[$fullName] = array( |
70 | 70 | 'qualifiedName' => $a->nodeName, |
71 | 71 | 'namespaceURI' => $a->namespaceURI, |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | assert('is_string($namespaceURI)'); |
87 | 87 | assert('is_string($localName)'); |
88 | 88 | |
89 | - $fullName = '{' . $namespaceURI . '}' . $localName; |
|
89 | + $fullName = '{'.$namespaceURI.'}'.$localName; |
|
90 | 90 | |
91 | 91 | return isset($this->attributes[$fullName]); |
92 | 92 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | assert('is_string($namespaceURI)'); |
104 | 104 | assert('is_string($localName)'); |
105 | 105 | |
106 | - $fullName = '{' . $namespaceURI . '}' . $localName; |
|
106 | + $fullName = '{'.$namespaceURI.'}'.$localName; |
|
107 | 107 | if (!isset($this->attributes[$fullName])) { |
108 | 108 | return ''; |
109 | 109 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | } |
131 | 131 | $localName = $name[1]; |
132 | 132 | |
133 | - $fullName = '{' . $namespaceURI . '}' . $localName; |
|
133 | + $fullName = '{'.$namespaceURI.'}'.$localName; |
|
134 | 134 | $this->attributes[$fullName] = array( |
135 | 135 | 'qualifiedName' => $qualifiedName, |
136 | 136 | 'namespaceURI' => $namespaceURI, |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | assert('is_string($namespaceURI)'); |
150 | 150 | assert('is_string($localName)'); |
151 | 151 | |
152 | - $fullName = '{' . $namespaceURI . '}' . $localName; |
|
152 | + $fullName = '{'.$namespaceURI.'}'.$localName; |
|
153 | 153 | unset($this->attributes[$fullName]); |
154 | 154 | } |
155 | 155 |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | { |
96 | 96 | assert('is_string($name)'); |
97 | 97 | |
98 | - $e = SAML2_Utils::xpQuery($parent, './saml_metadata:' . $name); |
|
98 | + $e = SAML2_Utils::xpQuery($parent, './saml_metadata:'.$name); |
|
99 | 99 | |
100 | 100 | $ret = array(); |
101 | 101 | foreach ($e as $i) { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | return NULL; |
123 | 123 | } |
124 | 124 | if (count($e) > 1) { |
125 | - throw new Exception('More than one ' . $name . ' in ' . $parent->tagName); |
|
125 | + throw new Exception('More than one '.$name.' in '.$parent->tagName); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | return $e[0]; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | if (strpos($keyword, "+") !== FALSE) { |
69 | 69 | throw new Exception('Keywords may not contain a "+" character.'); |
70 | 70 | } |
71 | - $value .= str_replace(' ', '+', $keyword) . ' '; |
|
71 | + $value .= str_replace(' ', '+', $keyword).' '; |
|
72 | 72 | } |
73 | 73 | $value = rtrim($value); |
74 | 74 | $e->appendChild($doc->createTextNode($value)); |
@@ -54,8 +54,8 @@ |
||
54 | 54 | return; |
55 | 55 | } |
56 | 56 | |
57 | - $this->IPHint = SAML2_Utils::extractStrings($xml, self::NS, 'IPHint'); |
|
58 | - $this->DomainHint = SAML2_Utils::extractStrings($xml, self::NS, 'DomainHint'); |
|
57 | + $this->IPHint = SAML2_Utils::extractStrings($xml, self::NS, 'IPHint'); |
|
58 | + $this->DomainHint = SAML2_Utils::extractStrings($xml, self::NS, 'DomainHint'); |
|
59 | 59 | $this->GeolocationHint = SAML2_Utils::extractStrings($xml, self::NS, 'GeolocationHint'); |
60 | 60 | |
61 | 61 | foreach (SAML2_Utils::xpQuery($xml, "./*[namespace-uri()!='".self::NS."']") as $node) { |
@@ -173,8 +173,8 @@ |
||
173 | 173 | foreach ($this->certificates as $cert) { |
174 | 174 | |
175 | 175 | /* We have found a matching fingerprint. */ |
176 | - $pemCert = "-----BEGIN CERTIFICATE-----\n" . |
|
177 | - chunk_split($cert, 64) . |
|
176 | + $pemCert = "-----BEGIN CERTIFICATE-----\n". |
|
177 | + chunk_split($cert, 64). |
|
178 | 178 | "-----END CERTIFICATE-----\n"; |
179 | 179 | |
180 | 180 | /* Extract the public key from the certificate for validation. */ |
@@ -12,7 +12,7 @@ |
||
12 | 12 | throw SAML2_Exception_InvalidArgumentException::invalidType('string', $passphrase); |
13 | 13 | } |
14 | 14 | |
15 | - $keyData = array ('PEM' => $keyContents, self::USAGE_ENCRYPTION => TRUE); |
|
15 | + $keyData = array('PEM' => $keyContents, self::USAGE_ENCRYPTION => TRUE); |
|
16 | 16 | if ($passphrase) { |
17 | 17 | $keyData['passphrase'] = $passphrase; |
18 | 18 | } |